Jump to content
  • Advertisement

Archived

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

MPG

need help on a class /fuction

This topic is 5324 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

having troble with this... #include <iostream> #include <conio.h> int main(){ class Add{ public: int x; int y; exe() ;std::cin>>x; std::cin>>y; std::cout<

Share this post


Link to post
Share on other sites
Advertisement
uhh, what is that suppose to do exactly? Your class definition syntax is wrong and it shouldn''t be inside your main().





--{You fight like a dairy farmer!}

Share this post


Link to post
Share on other sites
quote:
Original post by MPG
having troble with this...


You''re not the only one having trouble with that code...
First use [.source][/.source] tags. This is just my best guess as to what your code is supposed to do.

#include <iostream>
#include <conio.h>

class Add
{
public:
int x;
int y;
void exe();
};

void Add:exe()
{
// some something here

}

int main(int argc, char *argv[])
{
int x, y;
std::cin >> x;
std::cin >> y;
std::cout << x+y;
getch();
return 0;
}


Share this post


Link to post
Share on other sites
YEP!!!!!

Guys, stop answering him. He is trying to act stupid. I have said this so many times, and no one ever beleives me.

Share this post


Link to post
Share on other sites
FOR ONCE CAN I GET HELP WITH OUT SOME ONE CRITIZING ME.I GAVE UP LIKE A YEAR AGO AND AM KINDA STILL LEARNING.

Sorry for the misunderstading;and if I sound suspisous

p.s. how old are you playgy.just curious.
sorry for the caps

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!