Thanks for ALL ITS working now>> CHEERS Ajmi
moloza
Posts
-
switch quantity not an integer! -
switch quantity not an integer!Thanks all but I need hello to be a pointer because it might be passed as an argument to some function (like in case of use 'recv' in socket programing) in the program. Actually I submet a very simple program but what if the program read hello from the keyboard and send it to another side in a socket connection, ofcourse, I will need hello to be a pointer. so the change must be somewhere in the program rather than the decleration of hello. but where?!! thanks again Moloza Ajmi
-
switch quantity not an integer!Hello all.. for the following program I got headache about the switch statment: if I use switch(*hello) I got a compile error : switch quantity not an integer! if I remove the stat I got a runtime error: segmentation fault! I need help to fix this problem.. #include main() { int *hello; printf("Hi, Enter any value > "); scanf("%d",&hello); switch (hello) { case 1: printf("your 1 luck number is > %d\n",hello); case 2: printf("your 2 luck number is > %d\n",hello); case 3: printf("your 3 luck number is > %d\n",hello); default: printf("your 4 luck number is > %d\n",hello); } } thanks Ajmi
-
C++ chat program, How to start?Hello everybody I want to start to programming a C++ chat small application. It my project. Now I want to know what should I know? From to start? How to start? what I need? All what I have now is visual C++ express and little c++ langauge experience. I know also that I have to make server code and client code. Any one could guid me to some site where I might get help regarding my project? Tahnks alot Ajmi