|
-
July 11th, 2008, 02:03 PM
#14
Re: Is there anything wrong with the code?
But if you run my original code in visual studio 2005, it will CRASH. So it looks like here uninitailized s2 is more than a warning. Thanks for your inputs.
 Originally Posted by Paul McKenzie
It does not need to be initialized. Note that the uninitialized variable is just a warning, it isn't an error.
Anytime you pass anything by value, and you haven't initialized what you passed, the compiler will give you a warning that you're passing a variable that is not initialized. Regardless of whether that entity is an int, a double, a char, a pointer, a pointer to a pointer, it doesn't matter as all of these are passed by value. If the entity isn't initialized, you get the warning.
Regards,
Paul McKenzie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|