472,993 Members | 2,384 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,993 software developers and data experts.

error C2227: left of '->ChassisID' must point to class/struct/union/generic type

for(i=0 ; i<listNum ; i++) {
checker.checkN1DisagreementSwitch(pRep_Active_SLis t[i].ChassisID, pRep_Active_SList[i].SlotID,
pRep_Standby_SList[i].ChassisID, pRep_Standby_SList[i].SlotID);
}
hi, i m getting the error "error C2227: left of '->ChassisID' must point to class/struct/union/generic type", when i try to compile the above code in my project.

The object(pRep_Active_SList) which is accessing the structure member variable(ChassisID) is a pointer object of that structure.

so, instead of ' . ' i used ' -> ' to access the structure variable. but again it shows the same error.
can any one help to solve it....

regard,
raja
Jan 29 '08 #1
3 12447
weaknessforcats
9,208 Expert Mod 8TB
pRep_Active_SLis t[i].ChassisID
Are you saying that ChassisID is a public member variable, like in a struct??

You may need t post the code that creates pRep_Active_SLis t[i] and the class/struct declaration of Rep_Active_SList.
Jan 29 '08 #2
Are you saying that ChassisID is a public member variable, like in a struct??

You may need t post the code that creates pRep_Active_SLis t[i] and the class/struct declaration of Rep_Active_SList.

hi.. good morning... thanks for reply me,

ya..ChassisID is a public member variable of the structure BSMChassisSlotList_t. The declaration of ChassisID is as follows

typedef struct _BSMChassisSlotList_t_ {
char ChassisID[BSM_CHASSIS_SIZE];
DWORD SlotID;
} BSMChassisSlotList_t;

pRep_Active_SList is a pointer object of the structure BSMChassisSlotList_t and the declaration is

DWORD NSNetSwitchExchangeEx(BSMChassisSlotList_t *pRep_Active_SList, BSMChassisSlotList_t *pRep_Standby_SList,int listNum)

sorry, i cont send u the whole code since it is 2 kloc code...

the code that create the pRep_Active_SLis t[i] is
for(i=0 ; i<listNum ; i++) {
checker.checkN1DisagreementSwitch(pRep_Active_SLis t[i].ChassisID, pRep_Active_SList[i].SlotID,
pRep_Standby_SList[i].ChassisID, pRep_Standby_SList[i].SlotID);
}

waiting for ur reply...

regards,
raja
Jan 30 '08 #3
weaknessforcats
9,208 Expert Mod 8TB
There's a lotta code missing. But I fudged in some dummy code and made a global array and got things to compile (but not link - i leave that to you.
Expand|Select|Wrap|Line Numbers
  1. #define BSM_CHASSIS_SIZE 1024
  2. typedef struct _BSMChassisSlotList_t_ {
  3. char ChassisID[BSM_CHASSIS_SIZE];
  4. DWORD SlotID;
  5. } BSMChassisSlotList_t;
  6.  
  7. class DUMMY
  8. {
  9.     public: 
  10.         void checkN1DisagreementSwitch(char* FirstID, DWORD FirstSlotID,
  11. char* SecondChassisID, DWORD SecondSlotID);
  12. };
  13. void checkN1DisagreementSwitch(char* FirstID, DWORD FirstSlotID,
  14. char* SecondChassisID, DWORD SecondSlotID)
  15. {
  16.  
  17. }
  18. BSMChassisSlotList_t pRep_Active_SList[1024];
  19.  
  20. DWORD NSNetSwitchExchangeEx(BSMChassisSlotList_t *pRep_Active_SList, BSMChassisSlotList_t *pRep_Standby_SList,int listNum)
  21. {
  22.     DUMMY checker;
  23.     int i = 0;
  24.     for(i=0 ; i<listNum ; i++) {
  25.     checker.checkN1DisagreementSwitch(pRep_Active_SList[i].ChassisID, pRep_Active_SList[i].SlotID,
  26.     pRep_Standby_SList[i].ChassisID, pRep_Standby_SList[i].SlotID);
  27.     }
  28.     return 0;
  29. }
  30. int main()
  31. {
  32.  
  33. }
  34.  
Be sure your pRep_Active_SList exists ssomewhere as an array.

Also please note that in your original code you had an embedded space. See the ^ in the code below.
checker.checkN1DisagreementSwitch(pRep_Active_SLis t[i].ChassisID,
----------------------------------------------------------------------------^
pRep_Active_SList[i].SlotID,
If that's in your actual code, then you will get an error.
Jan 30 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: toufik toufik | last post by:
I'm using the errorHandler function (http://www.zend.com/zend/spotlight/error.php) to manage error handling in my code, the problem is that in all the tests that I did the error type is always...
2
by: Iona | last post by:
Does anyone know this type of error means? Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) Could not use ''(unknown)''; file already in use. /asp/PPLMain/memberpage.asp, line...
1
by: Iona | last post by:
Thanks for the reply it helped me but then I get this Error Type: Provider (0x80004005) Unspecified error /asp/PPLMain/memberpage.asp, line 10 and my line 10 is still ...
0
by: ITALstudio s.r.l. | last post by:
Hy, In my application I create instances of windows forms into different AppDomain. If I repeat 5 times the following sequence: - Creating AppDomain; - Creating instance of windows form...
6
by: Water Cooler v2 | last post by:
What're the members of the error class/object? Is there a complete reference to all JavaScript objects available on the Web?
5
by: crystalattice | last post by:
I've finally figured out the basics of OOP; I've created a basic character creation class for my game and it works reasonably well. Now that I'm trying to build a subclass that has methods to...
0
by: DKn | last post by:
Hi , I am having a .Net Activex control. I have done coding for COMRegistering and Unregistereing in C#.Net. The code is follows.. static void ComRegister(Type t) { ...
6
by: Myxamatosis | last post by:
Upon compiling my code for a fraction class, the error that i get is a good 50 or so repetitions of error: Class "Fraction" has no member named "Numer" and error: Class "Fraction" has no member...
2
by: colesslow | last post by:
i have these asp files to edit a record in my sql server..but it can't be done. the error is Error Type: ADODB.Recordset (0x800A0E7D) The connection cannot be used to perform this operation. It...
1
by: shivasusan | last post by:
Hi Friends! Please Help me! How i can solve this error? Please explain me, what is the error and how to solve? Error Type: ADODB.Recordset (0x800A0E7D) The connection cannot be used to...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.