Ask your own question, for FREE!
Computer Science 7 Online
myininaya (myininaya):

hey osanseviero! :) here are some stupid questions: explain what void and int means. and put it dumb terms

OpenStudy (osanseviero):

Lolz... Well, i suppose you refer to c++ or C...because void has lots of meanings. Void: It means "nothing" or "no type". In a more "complicated" way, it means that the function doesnt return a value. Int: I will tell you in an easy way. Int represents integer numbers. If you are not sure with void, read this ;)

myininaya (myininaya):

yes oops c++ lol

myininaya (myininaya):

ok int is easy to understand

myininaya (myininaya):

i know what an integer it lol

myininaya (myininaya):

now void i don't know what the point is to do voids

OpenStudy (osanseviero):

oops i forgot to paste the link, wait a sec http://www.lix.polytechnique.fr/~liberti/public/computing/prog/c/C/SYNTAX/void.html

myininaya (myininaya):

lol

OpenStudy (osanseviero):

it is harder to explain, but it is when the function doesnt gives you a value

myininaya (myininaya):

you know after it said read this i reread the paragraph because i didn't know what else to read lol

OpenStudy (osanseviero):

lol sorry

myininaya (myininaya):

void bresLine( blah blah) doesn't return anything is this just defining the parts that will be used later i think i get it thanks so much you are truly awesome

OpenStudy (osanseviero):

lol thanks :)

OpenStudy (anonymous):

err void means more like there is nothing returns from that func(i mean a func defined as void) ,, or you can use functype funcname(void) as u want to say no parameteres in this func ;) for example void cls(coid) ;)

myininaya (myininaya):

sorry korcan i don't think i can help you with yours :(

OpenStudy (anonymous):

just think it like that void funcs does not get a return value, for excamplue we have a func named Summation(x,y), it does return x+y, but for a func like CLS (clear screen) it likes that CLS(void) and it only clears screen it does not return a value, so you can say its a void func ^.^ but summation is not

OpenStudy (anonymous):

u mean my X86 Assembly question?

myininaya (myininaya):

yes

OpenStudy (anonymous):

np man, but u shuld start to work on X86 assembly too, i been working on programming 2 years, (since i was 12) learned Java, QBASIC, VB.NET, C++, C#,C , developed over 4 games in C#, XNA (like tetr 2D games) and solved over algorithm questions, but once I started to work on X86 ASSEMBLY i see i know nothing :P and got shocked -.-'

OpenStudy (anonymous):

*** solved over 6.000 ....***

myininaya (myininaya):

wow i'm a beginner

OpenStudy (osanseviero):

lol

OpenStudy (anonymous):

if i had a chance, i would make myself begin programming with X86 Assembly :P

OpenStudy (anonymous):

how old are you?

OpenStudy (anonymous):

http://stackoverflow.com/questions/1043034/what-does-void-mean-in-c-c-and-c NULL and void may have different meanings in Law, in Math, and in C and it's derivatives. Void is generally used in 3 places in C (in the other languages they might not have such a use or are optional): They are placed in place of function arguments:- int foo(void) /*foo will not accept any arguments. In C++ (not sure about java) you can just have int foo() since void in that case would be optional */ They are also used when specifying a function's return value: void foo(int bar) /* foo will never return a value */ Also, they are used to declare generic pointers that point to objects of unknown data types: void *foo = NULL; /* Note that in the standard it's illegal to dereference a *void pointer without casting it to a proper type */ Sometimes you don't require a return value from a function (like printf for example, even though it actually returns an int IIRC.) Casting it as void is a polite way of saying that you don't want to use the functions return value, forcing it to return nothing. If the operating system you are programming for can't return a value, declaring main to have a void return type would be the polite way to do things (people will want to hurt you if you declare main with a void return type if the system can deal with main's return value though so unless you know what you're doing declare main with an int return type (C) ).

OpenStudy (anonymous):

I guess you know what int means :-D general type for an integral value.

OpenStudy (anonymous):

integer*

OpenStudy (anonymous):

integral values are integers anyway :-D but you have so many kinds. char, short int, long int, long long int...

OpenStudy (anonymous):

and then there's unsigned/signed.

OpenStudy (anonymous):

yeap ^.^ err well we can2t say all the integral values as integer, they can be sometimes float :D

myininaya (myininaya):

thank you guys for all your input

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!