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

C / C++ / MFC

 
GeneralRe: Url problem Pin
rrrado10-Apr-03 3:46
rrrado10-Apr-03 3:46 
GeneralRe: Url problem Pin
Jump_Around10-Apr-03 7:59
Jump_Around10-Apr-03 7:59 
GeneralRe: Url problem Pin
rrrado10-Apr-03 21:48
rrrado10-Apr-03 21:48 
GeneralShowing preview in the explorer like for bmp etc. Pin
YuraSV10-Apr-03 3:31
YuraSV10-Apr-03 3:31 
GeneralChanges in STL from VC6 to VC7 Pin
Franz Klein10-Apr-03 3:17
Franz Klein10-Apr-03 3:17 
GeneralRe: Changes in STL from VC6 to VC7 Pin
Alexandru Savescu10-Apr-03 4:17
Alexandru Savescu10-Apr-03 4:17 
GeneralRe: Changes in STL from VC6 to VC7 Pin
Nemanja Trifunovic10-Apr-03 6:24
Nemanja Trifunovic10-Apr-03 6:24 
Generalswitch statement Pin
Aaron Knox10-Apr-03 3:13
Aaron Knox10-Apr-03 3:13 
Hi all,
I'm still working on my switch statement program (from previous post)thanks to Joaquin my loop is working but for some reason my switch statements are not being activiated.
I've included a portion of my code, the switch statements continue for each letter a state begins with (d,f,g,h,i,k,etc)
Thanks,
Aaron

<br />
//this program is supposed to read state abbreviations from a file and output the corrosponding state to another file<br />
 <br />
#include <iostream><br />
#include <fstream><br />
<br />
using namespace std;<br />
<br />
int main()<br />
{<br />
  ifstream inAbrev("state abs.txt");               //opens the input file<br />
  ofstream outState("states with abvs.txt");       //opens the output file<br />
  char firstLetter,<br />
       secondLetter;<br />
<br />
  inAbrev >> firstLetter >> secondLetter;<br />
  cout << firstLetter <<  secondLetter << endl;    //just for me to see if anything is happening<br />
  <br />
  while(inAbrev)                                   //read til the end of the file<br />
      {<br />
	inAbrev >> firstLetter >> secondLetter;<br />
        cout << firstLetter <<  secondLetter << endl;<br />
<br />
  switch (firstLetter)<br />
          {<br />
	  case 'A' : switch (secondLetter)<br />
				 {<br />
					case 'L' : outState << inAbrev << " is " << "Alabama" << endl;<br />
                                                  cout << inAbrev << " is " << "Alabama" << endl;<br />
                                                  //here i'm trying to see if anything is happening	<br />
						break;<br />
					case 'K' : outState << inAbrev << " is " << "Alaska" << endl;<br />
						break;<br />
					case 'Z' : outState << inAbrev << " is " << "Arizona" << endl;<br />
						break;<br />
					case 'R' : outState << inAbrev << " is " << "Arkansas" << endl;<br />
						break;<br />
				 }<br />
	  case 'C' : switch (secondLetter)<br />
				 {<br />
					case 'A' : outState << inAbrev << " is " << "California" << endl;<br />
						break;<br />
					case 'O' : outState << inAbrev << " is " << "Colorado" << endl;<br />
						break;<br />
					case 'T' : outState << inAbrev << " is " << "Connecticut" << endl;<br />
						break;<br />
				 }<br />



arrrgh
GeneralRe: switch statement Pin
Zdeslav Vojkovic10-Apr-03 3:28
Zdeslav Vojkovic10-Apr-03 3:28 
GeneralRe: switch statement Pin
Dave Kreskowiak10-Apr-03 6:03
mveDave Kreskowiak10-Apr-03 6:03 
GeneralRe: switch statement Pin
Toni7810-Apr-03 19:13
Toni7810-Apr-03 19:13 
GeneralMemory Leaks in ADO and MSXML Pin
butchb10-Apr-03 2:56
butchb10-Apr-03 2:56 
Generalprocess exe full path Pin
cubiq10-Apr-03 2:54
cubiq10-Apr-03 2:54 
GeneralRe: process exe full path Pin
valikac10-Apr-03 7:53
valikac10-Apr-03 7:53 
GeneralRe: process exe full path Pin
cubiq10-Apr-03 21:15
cubiq10-Apr-03 21:15 
GeneralParsing "*.xls" file Pin
Abin10-Apr-03 2:47
Abin10-Apr-03 2:47 
GeneralRe: Parsing "*.xls" file Pin
Chris Losinger10-Apr-03 2:56
professionalChris Losinger10-Apr-03 2:56 
GeneralRe: Parsing "*.xls" file Pin
Zdeslav Vojkovic10-Apr-03 3:06
Zdeslav Vojkovic10-Apr-03 3:06 
GeneralCounting characters in a buffer Pin
Overfiend10-Apr-03 2:32
Overfiend10-Apr-03 2:32 
GeneralRe: Counting characters in a buffer Pin
rrrado10-Apr-03 2:50
rrrado10-Apr-03 2:50 
GeneralRe: Counting characters in a buffer Pin
yaname10-Apr-03 3:29
yaname10-Apr-03 3:29 
GeneralRe: Counting characters in a buffer Pin
Overfiend10-Apr-03 20:35
Overfiend10-Apr-03 20:35 
QuestionHow to ignore Window activate ? Pin
rrrado10-Apr-03 2:19
rrrado10-Apr-03 2:19 
AnswerRe: How to ignore Window activate ? Pin
imsniper11-Apr-03 0:41
imsniper11-Apr-03 0:41 
AnswerRe: How to ignore Window activate ? Pin
imsniper11-Apr-03 1:00
imsniper11-Apr-03 1:00 

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.