Click here to Skip to main content
15,921,062 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Class-Constructing function Pin
FlyingDancer9-Jul-03 22:59
FlyingDancer9-Jul-03 22:59 
Questionconsole program font size? Pin
DaveE9th9-Jul-03 20:24
DaveE9th9-Jul-03 20:24 
AnswerRe: console program font size? Pin
Iain Clarke, Warrior Programmer9-Jul-03 22:58
Iain Clarke, Warrior Programmer9-Jul-03 22:58 
AnswerRe: console program font size? Pin
Anthony_Yio10-Jul-03 1:44
Anthony_Yio10-Jul-03 1:44 
GeneralRe: console program font size? Pin
DaveE9th12-Jul-03 2:35
DaveE9th12-Jul-03 2:35 
Questionfull screen? Pin
DaveE9th9-Jul-03 20:21
DaveE9th9-Jul-03 20:21 
AnswerRe: full screen? Pin
Magnus Westin9-Jul-03 22:33
Magnus Westin9-Jul-03 22:33 
Generalhelp with IF statement Pin
DaveE9th9-Jul-03 20:13
DaveE9th9-Jul-03 20:13 
I'm working on the program below. It sorts numbers fine, but it only lets me sort ONE number. I want to have the option to either choose to enter another search or quit. I'm not sure how to setup the program to repeat the search. How can I accomplish this. Thanks, Dave.
<br />
<br />
#include <iostream><br />
#include <cstdio><br />
using namespace std;<br />
<br />
int main()<br />
<br />
{<br />
   int x;<br />
   int i;<br />
   char str[80];<br />
   char Info [] [300] = <br />
   {<br />
   "3030-02-000-5287" , "Here is the information for this number."<br />
   "3030-03-000-0029" , "Here is the information for this number."<br />
   };<br />
<br />
   cout<<"Please enter a number:\n";<br />
   cin>>str;<br />
<br />
   for(i=0; i < 4; i += 2)<br />
	   if(!strcmp(str, Info[i]))<br />
	   {<br />
		   cout<<"Information:"<<Info[i+1]<<"\n";<br />
		   break;<br />
	   }<br />
<br />
	   {if(i == 4)<br />
		   cout<<"Number not found.\n";<br />
	   }<br />
<br />
	   {cout<<"\nWould you like to check another?\n";<br />
		   cout<<"Enter 1 for yes, 0 for no.\n";<br />
		   cin>>x>>"\n";}<br />
<br />
//I got stuck on the IF statement here.<br />
			<br />
       return 0;<br />
}<br />
<br />

-----------------------------------------------------


VC++ 6.0
GeneralRe: help with IF statement Pin
Rage9-Jul-03 20:46
professionalRage9-Jul-03 20:46 
GeneralRe: help with IF statement Pin
DaveE9th9-Jul-03 21:28
DaveE9th9-Jul-03 21:28 
GeneralRe: help with IF statement Pin
Ted Ferenc9-Jul-03 21:45
Ted Ferenc9-Jul-03 21:45 
GeneralRe: help with IF statement Pin
Rage9-Jul-03 21:51
professionalRage9-Jul-03 21:51 
GeneralRe: help with IF statement Pin
DaveE9th9-Jul-03 21:54
DaveE9th9-Jul-03 21:54 
GeneralRe: help with IF statement Pin
Rage9-Jul-03 23:01
professionalRage9-Jul-03 23:01 
GeneralRe: help with IF statement Pin
DaveE9th10-Jul-03 7:26
DaveE9th10-Jul-03 7:26 
GeneralThe UINT range problem in MFC. Pin
Kevein9-Jul-03 17:54
Kevein9-Jul-03 17:54 
GeneralRe: The UINT range problem in MFC. Pin
Neville Franks9-Jul-03 18:04
Neville Franks9-Jul-03 18:04 
GeneralRe: The UINT range problem in MFC. Pin
Kevein13-Jul-03 15:20
Kevein13-Jul-03 15:20 
GeneralAuto Device Driver Installation.. Pin
Member 4048139-Jul-03 15:25
Member 4048139-Jul-03 15:25 
GeneralRe: Auto Device Driver Installation.. Pin
IceMatrix10-Jul-03 8:50
IceMatrix10-Jul-03 8:50 
GeneralThread Programming &amp; Matlab Pin
samr679-Jul-03 14:50
samr679-Jul-03 14:50 
GeneralRe: Thread Programming &amp; Matlab Pin
Abbas_Riazi9-Jul-03 18:17
professionalAbbas_Riazi9-Jul-03 18:17 
GeneralRe: Thread Programming &amp; Matlab Pin
samr679-Jul-03 19:08
samr679-Jul-03 19:08 
GeneralRe: Thread Programming &amp; Matlab Pin
kochhar10-Jul-03 14:32
kochhar10-Jul-03 14:32 
Questionfwrite error??? Pin
will13839-Jul-03 11:15
will13839-Jul-03 11:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.