LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 09-03-2013, 12:27 PM   #1
islam_assi
LQ Newbie
 
Registered: May 2013
Location: Palestine
Posts: 6

Rep: Reputation: Disabled
Question help please " error request for member ‘out’ in something not a structure or union


Hello

if anyone can help me with this error in the last two lines of the "makeEdgeBetween2Nodes " function:
error is " request for member ‘out’ in something not a structure or union "


typedef st_graphNode ;
typedef struct st_edgeList
{
double val;
struct st_edgeList *next;
//struct st_edgeList *previous;
struct st_graphNode *node;
}t_edgeList ;

typedef struct st_graphNode
{
int val;
int additional ;
struct st_graphNode *next;
//struct st_graphNode *previous;
t_edgeList *out;
}t_graphNode;

void makeEdgeBetween2Nodes(t_graphNode **node1,t_graphNode **node2 , t_edgeList **e)
{
inserEdge(&(*node1),&(*e));
inserEdge(node2,e);

((node1)->out)->node=node2;
((node2)->out)->node=node1;
}
 
Old 09-03-2013, 07:55 PM   #2
elucches
Member
 
Registered: Jan 2011
Posts: 108

Rep: Reputation: 11
Hello,
If I'm not mistaken, you're trying to access member out from a pointer to an array of t_graphNodes (or something like that), i.e. to do
Code:
node->out
I think it should be
Code:
t_graphNode * node
instead of
Code:
t_graphNode ** node
But I'm not a programmer.
 
  


Reply



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
error: ‘struct request’ has no member named ‘current_nr_sectors’ jideesha Programming 2 09-05-2012 12:12 AM
error: Error for wireless request "Set Mode" (8B06) : invalid argument "roaming" penguin chick Linux - Wireless Networking 5 08-22-2008 01:16 PM
compiling kernel 2.6.8.1, net/ipv6/route.c: Error: request for member `lock' yoolee Linux - Kernel 0 11-15-2007 04:20 PM
Request for WPC11v4 "State of the Union" polymath3 Linux - Wireless Networking 0 02-21-2004 01:36 PM

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

All times are GMT -5. The time now is 06:33 PM.

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