Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

killadude

AddIt() function

This topic is 5979 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
I think you just made it up;
maybe its a function he found in a tutorial. In that case, killadude, you have to define it first.

"I''ve learned something today: It doesn''t matter if you''re white, or if you''re black...the only color that REALLY matters is green"
-Peter Griffin

Share this post


Link to post
Share on other sites
in my book "teach yourself c++ in 21 days"
it uses addit like this
#include <iostream.h>

void main()
{
int iNum1;
int iNum2;
int iResult;

iResult = AddIt(iNum1, iNum2)

cout<<"The result is: \n";
cout<< iResult;
cout<<"\n";
}

SKATEBOARDING IS NOT A CRIME!

Share this post


Link to post
Share on other sites
thanks fruny- but i already know that, i was just askin if that function really worked or was it just lack of knowlege of the author of the book, but thanks for your post

SKATEBOARDING IS NOT A CRIME!

Share this post


Link to post
Share on other sites
Frankly, I don''t trust those "learn in days" books. I find it''s more of a gimic to sell the book, and any book that needs a gimicky name is a suspicious one (see also Books for Dummies).

"I''''m not evil... I just use the power of good in evil ways."

Share this post


Link to post
Share on other sites
To answer your question, no, it's not a function. The author probably defined it somewhere in a previous chapter.

if for some reason it is an oversight (if it is i would put down the book and look elsewhere to learn c++ =) ) it's probably defined like this:

    
#include <iostream.h>

int AddIt(int num1, int num2)
{
return num1 + num2;
}

void main()
{
int iNum1;
int iNum2;
int iResult;

iResult = AddIt(iNum1, iNum2)

cout<<"The result is: \n";
cout<< iResult;
cout<<"\n";
}



Edited by - AbsolutDew on February 5, 2002 3:13:51 AM

Share this post


Link to post
Share on other sites
quote:
Original post by Tac-Tics
Frankly, I don''t trust those "learn in days" books. I find it''s more of a gimic to sell the book, and any book that needs a gimicky name is a suspicious one (see also Books for Dummies).


"optimised ultra sparc assembly for dummies"



Beer - the love catalyst
good ol'' homepage

Share this post


Link to post
Share on other sites
Well, it most certainly must be a function (or a function-like macro), otherwise any source file referencing it wouldn''t compile without at least a warning. But, of course it''s not a standard function.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!