Thread: need help!!

  1. #1
    Registered User
    Join Date
    Nov 2009
    Location
    korea
    Posts
    5

    need help!!

    insert
    Code:
    people need help. I am a newbie with C++ and I need some help with this. IF IT IS  POSSIBLE PLEASE DRAW IT. PLZPLZPLZPLZ
    
    typedef struct course_type
    {
    	char dept[4];
    	char course_name[20];
    	char prof_ID[7];
    	int credit;
    };
    
    
    typedef struct student
    {
    	int st_num;
    	struct name_type
    	{	char last[20];
    		char midinit;
    		char first[20];
    	}
    	struct address_type
    	{	char street[25];
    		char city[10];
    		char state[2];
    		int zip;
    	}address;
    	int	no_of_courses;
    	course_type course[10];
    }

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    What help do you need?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Oct 2009
    Location
    While(1)
    Posts
    377
    yah structure inside structure is possible called i think container structures and about the syntax it will give compile time error

  4. #4
    Registered User
    Join Date
    Nov 2009
    Location
    korea
    Posts
    5
    i need to make a report on it. need to explain everything and draw table

  5. #5
    Registered User
    Join Date
    Oct 2009
    Location
    While(1)
    Posts
    377
    i think what you want is that student table with st_num as its member kind of just do it buddy

    structure name will be container and the elements of it will be its rows i think

  6. #6
    Registered User
    Join Date
    Apr 2004
    Location
    Ohio
    Posts
    147
    Quote Originally Posted by midasmidas View Post
    i need to make a report on it. need to explain everything and draw table
    Sounds like you want us to do your homework for you. If that's the case, you're asking the wrong people.
    Last edited by leeor_net; 11-10-2009 at 04:39 PM.

Popular pages Recent additions subscribe to a feed

Tags for this Thread