NEWB & Very LowiQ Question but

D

Deleted member 4362

⠀ ⠀
Joined
Dec 15, 2019
Posts
31,002
Reputation
36,319
Can you explen in extremely simple terms how I use the 'void' member function in C++

I never understood it and always just avoid using it but I don't get what it means when they say it returns nothing

@PrinceLuenLeoncur @ItsOVERBuddyBoyos @DoctorLooksmax pls
 
Like if it returns nothing WTF is the point in using it why can't I just use int or something else
 
I don’t code that language sorry
 
  • WTF
Reactions: Deleted member 4362
Haven't programmed in almost 3-4 years but I was doing cpp.
Void is used to define a function that doesn't return anything.
Sometimes you want to make functions that perform actions but don't return any value.
void can also be used to define a pointer that can point to any type of value but from what you are writing I don't think you are not there yet so don't even bother.
 
  • +1
Reactions: Deleted member 4362 and Mr.Proper
Haven't programmed in almost 3-4 years but I was doing cpp.
Void is used to define a function that doesn't return anything.
Sometimes you want to make functions that perform actions but don't return any value.
void can also be used to define a pointer that can point to any type of value but from what you are writing I don't think you are not there yet so don't even bother.
I actually remember pointers from C, thank you for the explanation.
 
  • +1
Reactions: Racky
There is no such thing as low iq questions
 

Similar threads

6’7whitechad
Discussion Very HARD question
Replies
3
Views
36
DrRodger
DrRodger
sub5retard333
Replies
0
Views
14
sub5retard333
sub5retard333
tgun564636
Replies
15
Views
66
tansel
tansel
True Harten 333
Replies
4
Views
25
Anatole
Anatole
PSLgodBlackPerson
Replies
6
Views
37
fm30366
fm30366

Users who are viewing this thread

Back
Top