![]() |
|
#1
|
|||
|
|||
Combining ComparisonsPlease see attachement for rules.
New Assignment: Here is what I have, Is this the best way to do this? CPP / C++ / C Code:
Last edited by admin : 23-Oct-2009 at 11:37.
Reason: Please insert your example C/C++ codes between [CPP] and [/CPP] tags
|
|||
|
#2
|
|||
|
|||
Re: Combining ComparisonsQuote:
Not in my opinion. First of all, there is some stuff that absolutely won't work: CPP / C++ / C Code:
CPP / C++ / C Code:
What you probably meant to do was CPP / C++ / C Code:
Similarly look at CPP / C++ / C Code:
The second part of the if condition compares the value of the string military, which was entered by the user to the value of your string variable yes. You didn't put anything into the variable named yes, so it's an empty string. You really need something like CPP / C++ / C Code:
However I have a really important issue with the style: To do what you want, a loop is utterly uncalled for I would say that you should consider something like this: CPP / C++ / C Code:
Regards, Dave Footnote: To make your C++ code look prettier in your posts, surround it with language-specific code tags: Put [c++] before the first line and put [/c++] after the last line. |
|
#3
|
|||
|
|||
Re: Combining ComparisonsOk, Dave, thank you, If I understand correctly, here is what I have, what do you think:
CPP / C++ / C Code:
Last edited by admin : 23-Oct-2009 at 11:37.
Reason: Please insert your example C/C++ codes between [CPP] and [/CPP] tags
|
|
#4
|
|||
|
|||
Re: Combining ComparisonsJust wanted to Thank Dave again, and also Apologize for not using the
correct cpp and /cpp coding. I overlooked that several times and was using just code and /code. So I am sincerely am sorry for missing that. I would of replied sooner but was a banned for a couple days. Thanks |
Recent GIDBlog
Toyota - 2009 May Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| combining localtime() members into a single long long | Howard_L | C Programming Language | 10 | 11-May-2007 23:58 |
| Combining Static & Dynamic content | rajumurugan | Apache Web Server Forum | 0 | 09-May-2007 09:05 |
| OO Language Comparisons | Hazy | Miscellaneous Programming Forum | 2 | 22-Nov-2006 04:36 |
| Combining of mfc and c sources | riswallow | MS Visual C++ / MFC Forum | 1 | 06-Nov-2006 02:12 |
| Combining Dll and Application for Pocket PC 2003 | ivriedel | .NET Forum | 4 | 20-Dec-2005 08:46 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The