Thread: help me in this!!!!

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    78
    can you please telll what strcture type means? isnt it is sufficient to just say struct?

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    No - in fact in C++ it's the other way around, the word struct is optional, but you NEED to give the name of the struct, e.g.
    Code:
    struct Section {
       // your stuff goes here  
    };
    
    Section someFunction(// some parameters) ;
    should work just fine.

    How is the compiler going to know WHICH of your potentially many structs that you want to use?

    Can I make a comment on your style as well:
    Code:
    	void populateGeometry(void);
    
    	static tag_t createSplineThruPoints(struct Section);
    
    	static struct SectionformSection(struct Section Section1,struct Section Section2);
    	
    	static struct SectionxtractPoints(struct Section Section1,int FromPoint, int ToPoint);
    Some of your functions begin with upper (blue) case, other functions start with lower case (red), and then you mix upper and lower case for the next words in the function name (green). I would also prefer correct spelling of "extract", rather than "xtract" - it's bound to confuse people with that sort of naming convention. Confused programmers make mistakes more often than those that are not confused. Consistancy reduces the chance of someone being confused.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed