Click here to Skip to main content
15,914,285 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Memory Limits Pin
David Crow25-Mar-05 16:02
David Crow25-Mar-05 16:02 
GeneralRe: Memory Limits Pin
Obi Wan 225-Mar-05 17:21
Obi Wan 225-Mar-05 17:21 
GeneralRestart the process Pin
mpapeo25-Mar-05 13:38
mpapeo25-Mar-05 13:38 
GeneralRe: Restart the process Pin
Anand for every one25-Mar-05 21:41
Anand for every one25-Mar-05 21:41 
GeneralRe: Restart the process Pin
mpapeo26-Mar-05 9:00
mpapeo26-Mar-05 9:00 
GeneralActiveX in C++ Pin
j1webb25-Mar-05 12:36
j1webb25-Mar-05 12:36 
General<<NEWB-Troubles with stacks Pin
rdt25325-Mar-05 11:48
rdt25325-Mar-05 11:48 
GeneralRe: <<NEWB-Troubles with stacks Pin
Paul M Watt25-Mar-05 12:56
mentorPaul M Watt25-Mar-05 12:56 
It sounds like the purpose is for you to write a stack class then use it. Your C++ book should describe the operations.

First you need to write a stack class.

Then while scanning the file, when ever you see a left { or [, you should push that character on the stack, and when you see a } or a ], you should check the top of the stack to see if the item that would be popped off is the same as the value you are comparing against. If it is the same, pop it off and continue scanning, otherwise the pairs are mismatched and you have invalid data.

When you get to the end of the file, the stack should be empty, if not, then you also have invalid data.

Good Luck


Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life!

GeneralRe: <<NEWB-Troubles with stacks Pin
FlyingTinman25-Mar-05 13:05
FlyingTinman25-Mar-05 13:05 
GeneralRe: &lt;&lt;NEWB-Troubles with stacks Pin
rdt25325-Mar-05 15:42
rdt25325-Mar-05 15:42 
GeneralRe: &lt;&lt;NEWB-Troubles with stacks Pin
David Crow25-Mar-05 16:03
David Crow25-Mar-05 16:03 
GeneralRe: &lt;&lt;NEWB-Troubles with stacks Pin
rdt25325-Mar-05 16:11
rdt25325-Mar-05 16:11 
GeneralRe: &lt;&lt;NEWB-Troubles with stacks Pin
David Crow26-Mar-05 7:07
David Crow26-Mar-05 7:07 
GeneralAccessing and displaying data of worker thread function Pin
Member 153706925-Mar-05 11:11
Member 153706925-Mar-05 11:11 
GeneralRe: Accessing and displaying data of worker thread function Pin
Paul M Watt25-Mar-05 12:59
mentorPaul M Watt25-Mar-05 12:59 
GeneralRe: Accessing and displaying data of worker thread function Pin
PJ Arends25-Mar-05 13:04
professionalPJ Arends25-Mar-05 13:04 
GeneralSaving Bitmap From Clipboard to file Pin
ww303125-Mar-05 8:18
ww303125-Mar-05 8:18 
GeneralRe: Saving Bitmap From Clipboard to file Pin
David Crow25-Mar-05 9:21
David Crow25-Mar-05 9:21 
GeneralRe: Saving Bitmap From Clipboard to file Pin
ww303125-Mar-05 11:01
ww303125-Mar-05 11:01 
GeneralVC++ 2003 .NET Pin
victorsk25-Mar-05 7:27
victorsk25-Mar-05 7:27 
GeneralRe: VC++ 2003 .NET Pin
Kevin McFarlane25-Mar-05 10:16
Kevin McFarlane25-Mar-05 10:16 
GeneralRe: VC++ 2003 .NET Pin
victorsk25-Mar-05 11:00
victorsk25-Mar-05 11:00 
GeneralRe: VC++ 2003 .NET Pin
Kevin McFarlane25-Mar-05 11:08
Kevin McFarlane25-Mar-05 11:08 
GeneralRe: VC++ 2003 .NET Pin
MMansonFan2529-Mar-05 23:19
MMansonFan2529-Mar-05 23:19 
GeneralUDP datagram, Pls help Pin
Kimdave25-Mar-05 6:46
Kimdave25-Mar-05 6:46 

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.