| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
strcmp Idea problem?
We need to use strcmp to compare 5 command line values, but some of them can be missing!
here is what it looks like: X jX add X jX (X stands for any double number). Any can be missing except the add part. The j's have to be there, if the number is there! Now we are supposed to use strcmp to make the program run fine if any random value (or more than 1) is missing! I can't think of a way. |
|
#2
|
|||
|
|||
|
well, what is your desired outcome? in other words, what does the program do?
|
|
#3
|
|||
|
|||
|
No solution can be provided if you don't specify what the program should do!!
All I can think of is to convert the numbers to string and compare them with strcmp. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > strcmp Idea problem? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|