hello i am new to c programming and all ive ever done in the way of programming is html and darkbasic.
if anyone give me some tips/pointers on c it would be much appreiciated.
thank you
hello i am new to c programming and all ive ever done in the way of programming is html and darkbasic.
if anyone give me some tips/pointers on c it would be much appreiciated.
thank you
Try reading the tutorial at www.cprogramming.com.
--
Mats
i will probably try to make a text based fighty thing like i made with darkbasic where there are combat multiplyers and stuff as a first thing to work towards - any tips. i know your gonna say "start simple" but this is quite simple to do ive done it before.
I'm not sure what you are asking for - tips like "use paranhesis and braces"? or tips like "you may need a function that looks like this <insert 20-100 lines of code>"?
One tip I have is: When writing conditional code, write it "constant first", because then you don't get into trouble with mixing single equal signs (assign value) with double equal signs (test for equality). E.g.If you happen to miss the double equal in the above statement, the compiler complains. If you turn the 7 and magic_number around, then the compiler will happily assign 7 to magic_number, and continue inside the if, because 7 is non-zero so represents "true" in C.Code:... if ( 7 == magic_number ) ... ...
--
Mats
Variations of BASIC and C may seem similar, but once you start noticing differences you'll find out that C is a lot harder to get things done with, although the power you have with the language is far greater.
So just like you know people will say "start simple", that's what you should do. Start simple.
thanks for the help ive done a few tutorials and am writing a program where you attack and it makes a number from 20 to 30 to take health off (i wanted to put what ive learnt into something) not saying im not having issues - cos i am. but again thanks for the help. and i have realised the differences but the structure is similar to that of basic.