need help on a class /fuction

Started by
7 comments, last by MPG 20 years, 3 months ago
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<<x+y; getch(){ return 0 } ps. im putting this code in a header file
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!}

--{You fight like a dairy farmer!}

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;}


im trying to make a funtion like an engine to print those wordds
You keep saying that you know C++, and yet...
YEP!!!!!

Guys, stop answering him. He is trying to act stupid. I have said this so many times, and no one ever beleives me.
And the rockets' red glare, the bombs bursting in air,gave proof through the fight that our flag was still there.Oh say, does that star-spangled banner yet waveover the land of the free and the home of the brave?
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
MPG - Get a book, quickly.

_________________Politics is the ability to foretell what is going to happen tomorrow, next week, next month and next year. And to have the ability afterwards to explain why it didn't happen. -- Winston ChurchillGDNet-0.2 - rate users the easy way with this nifty Firefox extension. Updated with new features.
Never mind I figuerd it out
can a mod /close topic please

This topic is closed to new replies.

Advertisement