473,763 Members | 1,373 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Left side of '->' requires a pointer to class; type found was Structure

Dear Friends

I have been getting the following error
Error 185: "WorkFlow_dce.c pp", line 58 # Left side of '->' requires a
pointer to class; type found was 'struct WF_SEARCH_WU'.
lclStruct->wfWuHandle.wor kunitId =(long) feStruct->wfWuHandle-
>workunitId;
^^^^^^^^
Error 185: "WorkFlow_dce.c pp", line 59 # Left side of '->' requires a
pointer to class; type found was 'struct WF_SEARCH_WU'.
lclStruct->wfWuHandle.wor kunitSeq = (int)feStruct-
>wfWuHandle->workunitSeq;
^^^^^^^^
Error 185: "WorkFlow_dce.c pp", line 60 # Left side of '->' requires a
pointer to class; type found was 'struct WF_SEARCH_WU'.
lclStruct->wfWuHandle.upd ateSerialNum = (int)feStruct-
>wfWuHandle->updateSerialNu m;
^^^^^^^^
Error 185: "WorkFlow_dce.c pp", line 61 # Left side of '->' requires a
pointer to class; type found was 'struct WF_SEARCH_WU'.
strcpy((char*)l clStruct->prodType,(char *)feStruct-
>prodType.c_str ());
^^^^^^^^
Error 185: "WorkFlow_dce.c pp", line 62 # Left side of '->' requires a
pointer to class; type found was 'struct WF_SEARCH_WU'.
strcpy((char*)l clStruct->prodSubType,(c har*)feStruct-
>prodSubType.c_ str());
^^^^^^^^
Error 185: "WorkFlow_dce.c pp", line 63 # Left side of '->' requires a
pointer to class; type found was 'struct WF_SEARCH_WU'.
strcpy((char*)l clStruct->opnType,(char* )feStruct-
>opnType.c_str( ));
^^^^^^^^
Error 185: "WorkFlow_dce.c pp", line 64 # Left side of '->' requires a
pointer to class; type found was 'struct WF_SEARCH_WU'.
strcpy((char*)l clStruct->customerNum,(c har*)feStruct-
>customerNum.c_ str());
^^^^^^^^

In my WorkFlow_dce.cp p file
In funtion definition of fillWfSearchStr ucture I have
void fillWfSearchStr ucture(WF_SEARC H_WU *lclStruct ,WfSearchWu
&feStruct)
{
lclStruct->wfWuHandle.wor kunitId =(long) feStruct->wfWuHandle-
>workunitId;
lclStruct->wfWuHandle.wor kunitSeq = (int)feStruct->wfWuHandle-
>workunitSeq;
lclStruct->wfWuHandle.upd ateSerialNum = (int)feStruct->wfWuHandle-
>updateSerialNu m;
strcpy((char*)l clStruct->prodType,(char *)feStruct->prodType.c_str ());
strcpy((char*)l clStruct->prodSubType,(c har*)feStruct-
>prodSubType.c_ str());
strcpy((char*)l clStruct->opnType,(char* )feStruct->opnType.c_str( ));
strcpy((char*)l clStruct->customerNum,(c har*)feStruct-
>customerNum.c_ str());
}

---------------------------------------------------------------------------------------------------------------------------------------
in WorkFlow_dce.h

The declaration of structure WF_SEARCH_WU
is

typedef struct
{
WF_WU_HANDLE wfWuHandle; // workunit handle structure
char prodType[4]; // [4]
char prodSubType[4]; // [4]
char opnType[7]; // [7]
char customerNum[11]; // [11]
}WF_SEARCH_WU;

Also the function declaration in the same file is as below
typedef WF_SEARCH_WU WfSearchWu;
void fillWfSearchStr ucture( WF_SEARCH_WU *lclStruct ,WfSearchWu
&feStruct );

Why would I get the above errors

Can someone please guide me in the right direction

Thanks
Amit

Feb 1 '07 #1
5 3198

Amit_Basnak napsal:
Dear Friends

I have been getting the following error
Error 185: "WorkFlow_dce.c pp", line 58 # Left side of '->' requires a
pointer to class; type found was 'struct WF_SEARCH_WU'.
lclStruct->wfWuHandle.wor kunitId =(long) feStruct->wfWuHandle-
workunitId;
---------------------------------------------------------------------------------------------------------------------------------------
in WorkFlow_dce.h

The declaration of structure WF_SEARCH_WU
is

typedef struct
{
WF_WU_HANDLE wfWuHandle; // workunit handle structure
char prodType[4]; // [4]
char prodSubType[4]; // [4]
char opnType[7]; // [7]
char customerNum[11]; // [11]
}WF_SEARCH_WU;

Also the function declaration in the same file is as below
typedef WF_SEARCH_WU WfSearchWu;
void fillWfSearchStr ucture( WF_SEARCH_WU *lclStruct ,WfSearchWu
&feStruct );

Why would I get the above errors

Can someone please guide me in the right direction

Thanks
Amit
You can access members of struct with operator . (DOT) if you have
instance of this struct. You can use operator -if you have pointer
to instance of struct or if you have defined overloaded operator-for
this structure.

Feb 1 '07 #2
On Feb 1, 4:13 pm, "Amit_Basna k" <Amit.Bas...@gm ail.comwrote:
Dear Friends

I have been getting the following error
Error 185: "WorkFlow_dce.c pp", line 58 # Left side of '->' requires a
pointer to class; type found was 'struct WF_SEARCH_WU'.
lclStruct->wfWuHandle.wor kunitId =(long) feStruct->wfWuHandle-
The error is quite clear, you are trying to use something as if it
were a pointer while it's not.
In my WorkFlow_dce.cp p file
In funtion definition of fillWfSearchStr ucture I have
void fillWfSearchStr ucture(WF_SEARC H_WU *lclStruct ,WfSearchWu
&feStruct)
I'm not sure, the error-message got line-wrapped so it's hard to tell
what it's pointing to but it seems to me like the parameter feStruct
is passed as a WfSearchWu-reference but you are trying to use it as if
it were a WfSearchWu-pointer. Either change the type of the parameter
of replace the '->' with a '.'.

--
Erik Wikström

Feb 1 '07 #3
Amit_Basnak wrote:
>
typedef WF_SEARCH_WU WfSearchWu;

void fillWfSearchStr ucture(
WF_SEARCH_WU *lclStruct ,
WfSearchWu &feStruct
)
{
lclStruct->wfWuHandle.wor kunitId =
(long) feStruct->wfWuHandle->workunitId;
"feStruct" you have declared as reference "WfSearchWu & feStruct", not
as pointer, and class WfSearchWu has no overloaded "operator->". Write
operator point "." instead of "->"
lclStruct->wfWuHandle.wor kunitId =
(long) feStruct.wfWuHa ndle->workunitId;
--
Maksim A Polyanin
Feb 1 '07 #4
Amit_Basnak wrote:
I have been getting the following error
Error 185: "WorkFlow_dce.c pp", line 58 # Left side of '->' requires a
pointer to class; type found was 'struct WF_SEARCH_WU'.
lclStruct->wfWuHandle.wor kunitId =(long) feStruct->wfWuHandle-
>workunitId;

[..]

In my WorkFlow_dce.cp p file
In funtion definition of fillWfSearchStr ucture I have
void fillWfSearchStr ucture(WF_SEARC H_WU *lclStruct ,WfSearchWu
&feStruct)
{
lclStruct->wfWuHandle.wor kunitId =(long) feStruct->wfWuHandle-
>workunitId;
Since 'feStruct' is a _reference_ to a 'WfSearchWu' objects, you must
use '.' to access its members.
[..]
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Feb 1 '07 #5
On Feb 1, 8:30 pm, "Victor Bazarov" <v.Abaza...@com Acast.netwrote:
Amit_Basnak wrote:
I have been getting the following error
Error 185: "WorkFlow_dce.c pp", line 58 # Left side of '->' requires a
pointer to class; type found was 'struct WF_SEARCH_WU'.
lclStruct->wfWuHandle.wor kunitId =(long) feStruct->wfWuHandle-
workunitId;
[..]
In my WorkFlow_dce.cp p file
In funtion definition of fillWfSearchStr ucture I have
void fillWfSearchStr ucture(WF_SEARC H_WU *lclStruct ,WfSearchWu
&feStruct)
{
lclStruct->wfWuHandle.wor kunitId =(long) feStruct->wfWuHandle-
workunitId;

Since 'feStruct' is a _reference_ to a 'WfSearchWu' objects, you must
use '.' to access its members.
[..]

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask- Hide quoted text -

- Show quoted text -
Thank you all for pointing out the cause of the error . The Error got
resolved with the desired changes.
Thank you all foryour help and time devoted to this.
Amit

Feb 2 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1731
by: Raymond H. | last post by:
Hello, in my vb projet, I put a WebBrowser and when I view the contents of my hard disk with 'WebBrowser1.Navigate "C:\"' I view my directory in the right side only and in the left side it is'nt the directory but others informations. How the get the directories in the left side and the files names in the right side like in the Windows Explorer ? Raymond H.
1
3456
by: Paul Bramscher | last post by:
Here's one for pathological SQL programmers. I've got a table of things called elements. They're components, sort of like amino acids, which come together to form complex web pages -- as nodes in trees which form parent-child relationships, sort of like newsgroups. For example, the parent_id field points to another element. Indent_level is there for denormalization purposes, to avoid costly recursive issues in querying. The...
3
5482
by: Doug McCrae | last post by:
http://www.btinternet.com/~doug.mccrae/go4learning/index.html As it says in the subject, a two column layout (plus header and footer boxes). I feel the left column really needs to be fixed width (151px) as it contains an image, while everything else is fluid. However this only works in IE 6.0. In Netscape and Opera I found that the auto width of the right column is 100% so it jumps down below the menu if the left column is fixed - not...
7
3242
by: Alex | last post by:
Hi Everone, I need some advice on how to setup 4 columns where the outside two are absolute (120px) and the inner two (side by side) are relevent (Fluid) and change with the screen. Here's my rough layout:
17
3060
by: orekinbck | last post by:
Hi There Say I want to check if object1.Property1 is equal to a value, but object1 could be null. At the moment I have code like this: if (object1 != null) { if (object1.Property == desiredValue)
4
1759
by: UJ | last post by:
I have a long list of items that the user will be able to select from. When they select an item, I'd like to have more detailed information appear on the right side of the screen. I've already got a datagrid set up with the clicking working correctly. Problem is, I'd like to have the list be scrollable but leave the info on the right alone. What can I put around the datagrid so that the entire thing becomes scrollable? TIA - Jeff.
5
6344
by: john_aspinall | last post by:
http://www.ainewmedia.co.uk/test.htm Im learning CSS based layout and Im pulling my hair out as to why wont my banner DIV float to the right of my login box? It works fine in IE. Any help will be greatly appreciated! Ive added coloured borders to try help with whats going on. Cheers...John
8
1907
by: Doron Farber | last post by:
Hi All, How can I Move the Server explorer window to the left. When ever I double click on the Server explorer top window it goes to the bottom of the IDE. Thanks, Doron
4
12469
by: =?Utf-8?B?UmljaA==?= | last post by:
Hello, Is there a setting/property for displaying a checkbox label (or radiobutton label) on the left hand side instead of the right hand side? Or am I limited to no text in the label - take on parent backcolor and add my own label to the left side? Thanks, Rich
4
10097
by: moondaddy | last post by:
I have a wpf project where I use a canvas to drag shapes around. when I drag a shape beyond the right or bottom side I get scrollbars which is good. I also get scrollbars when I zoom in and a shape goes beyond the right or bottom side. However, I don't get scrollbars when shapes move beyond the left or top side of the canvas. This is bad. I need the behavior similar to Visio where you can drag an object past the left or top and you will...
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9822
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8822
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3523
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2793
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.