- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 2
- Posts with Downvotes
- 1
- Downvoting Members
- 2
13 Posted Topics
Re: [code]int this.health = 10, this.defense = 3; char this.name = "Orc";[/code] //you can't init them here; [code] int getAttributesInfo() { attributes [] = {this.health, this.defense, this.name}; return attributes; } [/code] you declread the function as int but "return attributes" confused me, else attributes is just an address. | |
Re: I think there is some Error in you in/out-put stream, for :"cin>> bit"(line 21) i guess you want getting one char(0 or 1) each time , but "cin" let you keep inputing untill you enter the "enter" . wish that can help you. | |
Re: since manishady gave you the code, i just give you some advise: 1) data structrue is a very important subject, 2) you should relize every model the books says. 3) may you success. | |
Re: [code] int main() { int x,y; char opt; while(1) {std::cout<<"please input the x,y"<<endl; std:: cin>>x>>y; std::cout<<"please input the operate"<<endl; std::cin>>opt; switch (opt) case '+' : return x+y; case '-' : return x-y; . . ; } } [/code] | |
| |
Re: win socket, yes first you should creat a socket in you server and listen() the request from the client i just started learn it recently ^ | |
Re: I haven't seen any excutive-able code in the main( ) and you should declear when to exit the prog . i think , lucky…… | |
Re: the function you declear in the class{}; has three paraments but^^ you know ? |