User Profile
Collapse
-
sorry...
i'm comparing 'a.charAt(i)' with the char in array 'tab[]'.
if all 'tab[0-25]' is not equal 'a.charAt(i)' then b += a.charAt(i).
i want to know whether, i compare them in a loop, so i don't need so many lines of code comparing tab[0] to tab[25]?
sorry again....Leave a comment:
-
can i do this in a loop?
...Code:if(a.charAt(i)!= tab[0] && a.charAt(i)!= tab[1] && a.charAt(i)!= tab[2] && a.charAt(i)!= tab[3] && a.charAt(i)!= tab[4] && a.charAt(i)!= tab[5] && a.charAt(i)!= tab[6] && a.charAt(i)!= tab[7] && a.charAt(i)!= tab[8] -
do...while loop
i'm trying to do a do while loop, to keep printing the data that matches the key of mymap.
my while statement printed an endless loop....
What should the while statement be??
...Code:do { if(mymap.find(input)!= mymap.end()) { cout<< mymap.find(input)->second<<endl; mymap.find(input)++; } else cout<<"No word(s) found."<<endl; -
try, catch , throw...
hi,
how many data types can a function throw?? and a catch block can contain how many arguments? -
hey savage,
can help me out here, i really have no idea how to do it......Leave a comment:
-
but what if i want the user to be able to enter number like 0000000, 0000125, 0123456........Leave a comment:
-
user input
hi,
what function can be used to make sure that the user input must be seven digits?
Code:int number; do { cout<<"Enter NUMBER"<<endl; cin>>number; if () cout<<"Please enter NUMBER with seven digits"<<endl<<endl; } while(); -
nothing there on removing BEGINNING and END BLANK spaces....
are there any function to use?Leave a comment:
-
how to TRIM BEGINNING and END BLANK spaces in STRING???
hi!
i need help in C programming to TRIM BEGINNING and END BLANK spaces in STRING..... -
-
thanks horace1...
y cant i use gets()? i change it to fgets() then it works.....Leave a comment:
-
warning: comparison between pointer and integer
hi...im new to C programming...n eed help...tried to run this code but got this error
fork.c: In function ‘parse’:
fork.c:44: warning: comparison between pointer and integer
fork.c:51: warning: assignment makes integer from pointer without a cast
fork.c:61: warning: comparison between pointer and integer
/tmp/cciECfg4.o: In function `main':
fork.c:(.text+0 x3a): warning: the `gets' function is dangerous...
No activity results to display
Show More
Leave a comment: