need help on a class /fuction
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
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;}
YEP!!!!!
Guys, stop answering him. He is trying to act stupid. I have said this so many times, and no one ever beleives me.
Guys, stop answering him. He is trying to act stupid. I have said this so many times, and no one ever beleives me.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement