Hi,
I recently bought a book-The Complete Reference C++ by Herbert Schildt. The first part explains about the similarities about C++ and C. The syntax used is different from the one my lecturer is teaching.
eg:
cout<< is replaced by printf
cin>> is replaced by scanf
I would like to know which syntax is more preferred in the programming world for C++.
Another topic I would like to ask is, C++ have a function:
rand()
I did read it on the tutorial but the number that is generated is the same-41. What did I do wrong here? part of the code is something as follow:
magic = rand()
cout<<magic;
Oh and what's the difference between <iostream> and <stdio>?
Thank you.