Jump to content
XCOMUFO & Xenocide

Easy Html 101: Forum Posting Tricks


LordT

Recommended Posts

I've seen discussions about code being a pain in the ... butt... to post on this forums due to text formatting. No more! :link:

 

Using the

<pre>-tag

text will be typed in a fixed width format and it will keep all whitespaces including tabs (but not here cause tabs switches controls in the posting form...)

 

Example:

int main(void)

{

return 0;

}

Link to comment
Share on other sites

well shoot me... i'm a beginner afterall... :)

and according to my limited knowledge the parenthesis is what the function recieves, not returns.

:) well not knowing those silly rules about how to do main doesn't make you a beginner all the time. It's a lack of standard between compilers I think that's to blame. some C++ compilers void main(void) is good enough. :) GCC is extra picky about alot of things on purpose to force you into coding nicer. like it doesn't purposly allow you to do certain things with macros because there is no defined ruled. then there other things you learn like

 

#indef blah

#ifndef ugh

#define blah

#define ugh

#endif

#endif

 

that right there isn't another thing you shouldn't do and I wouldn't have known that if it was for another programmer once pointing it out to me. some precompilers can handle the spaces before the #'s so you shouldn't ident there although I think you can ident after the #. I don't do that either and instead add a comment like // blah after the #endif

Link to comment
Share on other sites

well the dude speaks at about -50mph and jumps into data-addrasses (&-thing) in functions before he tells one how to do an if-statement.

feels like that anyway

so i'll stick to online resources and books :D

 

And know! You should ALWAYS begin every program with including iostream, conio and iomanip! Otherwise you cant use clrscr(); and getch(); DUH !!

:blink:

Link to comment
Share on other sites

×
×
  • Create New...