![]() |
|
#1
|
|||
|
|||
Expected primary-expression before '.' tokenWell, First of all, Sorry if i'm repeating a question asked before, cause i've seen a topic simillar to mine, but i couldn't understand what was explained there.
I'm new here, and read the 'rules', so i'll just give a brief information bout myself: I'm Dinho, and work with Coldfusion, i'm learning C for my college. Now let's go to what matters: i'm getting an "expected primary-expression before '.' token" error when i try to compile the following code: CPP / C++ / C Code:
Regards, Dinho |
|||
|
#2
|
|||
|
|||
Re: expected primary-expression before '.' tokenQuote:
First of all, I think you need to declare a variable whose type is the struct that you defined, not make a typedef. Maybe something like: CPP / C++ / C Code:
Code:
Now, if you want to make a typedef for the struct (to simplify the variable declaration), you could try something like: CPP / C++ / C Code:
Same output as before. Regards, Dave |
|
#3
|
|||
|
|||
Re: expected primary-expression before '.' tokenWorks perfectly!
TY, Dave! |
Recent GIDBlog
Problems with the Navy (Chiefs) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| main.cpp:15: error: expected primary-expression before ',' token | DingbatCA | C++ Forum | 8 | 29-Oct-2007 13:52 |
| Error: expected unqualified-id before ‘{’ token | ftmthy412 | C++ Forum | 5 | 12-Sep-2007 17:49 |
| Converting PHP to C and I need a little help | Allenport | C Programming Language | 4 | 14-Aug-2006 14:38 |
| error: expected primary-expression before '.' token | Honourable Mist | C++ Forum | 11 | 18-Feb-2006 13:15 |
| Help with syntax errors | PeteGallo | C Programming Language | 7 | 08-Aug-2005 21:30 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The