User forums > Using Code::Blocks
Newbie that need some understanding void int
(1/1)
snowfiring:
Well here im using a basic prototype in a header file and the old function from the course im taking told me to use
--- Code: ---void WriteAnswer(int x);
--- End code ---
I had originally used
--- Code: ---int WriteAnswer(int x);
--- End code ---
and it had worked but then was told to use void but it never really explained the difference and im wondering why i would use void over int.
stahta01:
--- Quote from: snowfiring on May 10, 2013, 05:47:27 am ---Well here im using a basic prototype in a header file and the old function from the course im taking told me to use
--- Code: ---void WriteAnswer(int x);
--- End code ---
I had originally used
--- Code: ---int WriteAnswer(int x);
--- End code ---
and it had worked but then was told to use void but it never really explained the difference and im wondering why i would use void over int.
--- End quote ---
Please post your C/C++ programming questions on a website that supports programming in C or C++.
From
http://forums.codeblocks.org/index.php/topic,9996.0.html
--- Quote ---1. This is NOT a general programming board. "How do I write a program that....", "Can anybody teach me how to", "I have this homework", "My program doesn't run and I don't have the slightest idea of why because I'm a C++ newcomer", "What is a compiler", "What does gcc do" is the kind of questions that is FORBIDDEN to ask.
--- End quote ---
Tim S.
Jenna:
Topic locked, as it violates our forum rules (as stated by Tim).
Navigation
[0] Message Index
Go to full version