LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-26-2004, 09:13 AM   #1
ashirazi
Member
 
Registered: Jul 2004
Posts: 60

Rep: Reputation: 15
c++: ERROR: Invalid indirection ( post 2)


Hey guys,

I posed this a few days back but got no replies. Just trying my luck this time...



Im getin an invalid indirection error for the following statement:

plco = (1 - pow(-(-psimin[i][1] / bsat[i][1]), ccsat[i][1])) * 100;

Does anyone have a clue? In here

plco - float
psimin - float
bsat - float
ccsat - float

Thanks a ton
shirazi
 
Old 08-26-2004, 10:12 AM   #2
dakensta
Member
 
Registered: Jun 2003
Location: SEUK
Distribution: Debian & OS X
Posts: 194

Rep: Reputation: 35
I think you need to post some more information.

For a start what language are you using? (I assume c or c++ but please specify)

What compiler are you using? (borland?)

Please post the exact error message and turn all compiler warnings on.

Where have you declared / instantiated psimin, bsat, ccsat?

You can't access a float with operator [ ], so are they arrays or pointers or some class of your own?

Have they been passed to a function or are they in the same scope as they were declared, and if they have been passed, what are the function arguments?

Ideally a minimal error inducing complete example would be nice, so if it is not a common compiler you are using then others can see what the error message is in more familiar terms.

Last edited by dakensta; 08-26-2004 at 10:15 AM.
 
Old 08-26-2004, 10:15 AM   #3
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
An invalid indirection means that you're trying to dereference somthing that isn't a pointer.

If psimin is a float, you can't write psimin[i][1], as if it was an array of pointers to float. And what is i? Whatever it is, it will be cast to an integer.

Please give the exact types of all these variables, preferably as they are defined in the code.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash parameter indirection possible? kornelix Programming 5 11-30-2005 08:35 AM
su error: password invalid Drunkalot Linux - General 2 08-13-2005 12:40 PM
c++: ERROR: Invalid indirection ashirazi Programming 0 08-22-2004 12:09 PM
invalid icmp error sent to a broadcast? phek Linux - Networking 2 06-11-2002 02:36 PM
installation error: Error mounting sda1: Invalid Argument sadirmata Linux - Newbie 1 01-29-2002 02:28 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration