Hi As a quick fix, put fflush(stdin); immediately after your scanf("%d",&x);
Hi In your 1st code snippet,you should have Action_Figure train_man; instead of Actioin_Figure train_man(); Best regards
Hi pushpat By the way, what made you think that a(b) will call call a copy constructor or assigment operator. As far as I know, once the object...
Hi pushpat I have limited experience of C++ but I think that you should have "a=b;" instead of "a(b);" to use the assignment operator in your...
Hi trying the following: int main() { //test a(3),b(6); test b(6); cout<<"a(b)calls"; test a(b); cout<<"sendobject...
For MS Visual C++, the following will do: #include <math.h> //or <math> double x=2.55; double polynomial = 3*pow(x,3)-5*pow(x,2)+6
Hi Execute the program in IDE or put getchar() at the end of the program. The DOS screen(?!) is at the moment outputing the result and closing at...
Hi M there is a way to ouput into a text file and you can see parameters and valuesin the text file. use sscanf() and its opposite sprintf()....
The last example should be char name[]="happy"; char *p=name, *tmp=p; printf("%s\n",p);//prints "happy" p=p+1; printf("%s\n",p);//prints "appy"...
Hi won Suppose that the input is "happy". Then p[] = word[]="happy" and consonant is 'h' . strcpy(p,p+1) makes p[]="appy" and we let...
Hi won The following program below works on my computer. You need to get used to pointers because they are useful and used very often. Ask me...
Hi won212 I can help you. But I have one questioin to be answered by you first. When the input is "happier", what shoud be the output? which of...
Hi Won instread of <iostream.h>, use <iostream>. My sample program has a bug - if the input has no bowel, it will go into a loop and never get...
Hi Copy and paste the following program to see if it does what you want. Your original sample program does not do that job! Best regards Chong...
Hi W Can you tell me what the output is supposed to be? Best regards Chong
Hi M I have modified my sample program a bit to add how to deal with errors. Best regards Chong ++++++++++++++++++++++++ #include <stdio.h>...
Hi M The file created in your program is a text file (c.f. you may add 't' to make sure that it is a text file, i.e. "rw+t"). If you open the file...
Hi M I am not sure what you are asking. You need to explain your project specifications more clearly. If you have already started programming...
Hi M I have written a simple or sample program for you as below. I hope it helps you. Best regards Chong ++++++++++++++++++++++++++++ #include...
Hi Z. I believe in making thigns easy for beginners. When I was a begfinner, I had chances to read many well writtne programs of other...
Separate names with a comma.