User Profile

Collapse

Profile Sidebar

Collapse
Warrax
Warrax
Last Activity: Jun 12 '07, 11:06 PM
Joined: Jun 12 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Warrax
    replied to What does "expected unqualified-id" mean?
    in C
    Sure.

    Code:
    #include <iostream>
    
    using namespace std;
    struct database {
               string name; // declares that the structure has a string
               // in it called name.
    int main()
    {
    cout<<"Enter your name.\n"; //displays the obvious
    getline(cin, name, '\n'); // records the user's input into the string name,
    // and terminates the command
    ...
    See more | Go to post

    Leave a comment:


  • Warrax
    replied to What does "expected unqualified-id" mean?
    in C
    When I put the struct before main and get rid of the 2nd main, this appears:

    14 C:\Documents and Settings\Main\M y Documents\subst ring and structures.cpp expected primary-expression before "name"
    14 C:\Documents and Settings\Main\M y Documents\subst ring and structures.cpp expected `;' before "name"
    14 C:\Documents and Settings\Main\M y Documents\subst ring and structures.cpp At global scope:
    ...
    See more | Go to post

    Leave a comment:


  • Warrax
    started a topic What does "expected unqualified-id" mean?
    in C

    What does "expected unqualified-id" mean?

    I am currently doing online tutorials for C++, and am pretty much stuck in a rut about this problem. It is saying that there's an expected unqualifed-id before '{' token (I will post the code in just a second) on line 11, and an expected ',' or ';' before '{' token also on line 11, however I don't have a clue what the first one means. The program is meant to save a user's name in a string variable within a structure, and to then show that name without...
    See more | Go to post
No activity results to display
Show More
Working...