News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Newbie that need some understanding void int

Started by snowfiring, May 10, 2013, 05:47:27 AM

Previous topic - Next topic

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 void WriteAnswer(int x);
I had originally used int WriteAnswer(int x);
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 void WriteAnswer(int x);
I had originally used int WriteAnswer(int x);
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.

Please post your C/C++ programming questions on a website that supports programming in C or C++.

From
http://forums.next.codeblocks.org/index.php/topic,9996.0.html

Quote1. 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.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Jenna

Topic locked, as it violates our forum rules (as stated by Tim).