Laser,
Thank you, it is comming together slowly. So if i understand, function calls are allowed in the but not at the file scope level becuase that portion of the program is for declarations only....
Type: Posts; User: Mathieas
Laser,
Thank you, it is comming together slowly. So if i understand, function calls are allowed in the but not at the file scope level becuase that portion of the program is for declarations only....
Thank you for the reply. That makes sense however I am not quite clear why I call a function to int a variable but cannot call a function straight up, as in the srand case. What is the logic behind...
I am using global variables mostly because i am teaching myself and as a result I prob have bad habits(I am using the jumping into c++ online book). I was just reading global variables are not the...
So function calls can only be present within the main function of the program, that makes sense. Thank you
I am new to C++ and still trying to understand the nuances of the the syntax. In the below example i am using the srand() function to set my random seed. I am just wondering why srand needs to be in...
grumpy,
Thank you for your time. That makes perfect sense!
Greetings!
I am new to C++ and I am currently reading jumping into C++ featured on this website. I am reading about the rand and srand functions. The book claims you need a function prototype for...
Thank you both for your time, makes total sense!
That makes perfect sense, thank you for your time!
In the book Jumping into C++ the author states that when doing comparisons between expressions (x != 0 && 10/x <5) the first comparison if returned false would short circuit the comparison stopping...
I am currently reading Jumping into C++ and the author states you can use comparision operators to compare two strings and see which comes first in aplhabetical order. I am unsure how to do this....
wow thanks guys! That makes total sense!
Thank you again guys, your time is really apperciated!
Jonathan
Hey all,
I have started reading the "jump to C++" book that I purchased from the parent website.
My question is about strings,
In chapter 3
I started with using "cin" to write to a string...