*sigh* my postfix thread gone

This is a discussion on *sigh* my postfix thread gone within the C++ Programming forums, part of the General Programming Boards category; server lag? i dunno but i had a whole post about postfix and my struggles with it go bye bye. ...

  1. #1
    Registered User
    Join Date
    Apr 2005
    Posts
    2

    *sigh* my postfix thread gone

    server lag? i dunno but i had a whole post about postfix and my struggles with it go bye bye. bleh. its too late in the evening to coherently retype it. Basically im trying to write a SIMPLE postfix calculator that can take 2 44 2 105 + + - and give me an answer. I cant even get the beginning code (i wrote it in main cause im so frustrated i am not even gonna try functions yet) This below is just my code for trying to remove the blanks and build the numbers to put into the stack

    Code:
    {
    	char ch;
    	cout<<"Postfix Calculator \n";
    	cout<<"Enter a legal positive integer postfix expression: \n";
    
    	
    	cin>>ch;
    	while (ch != '\n')
    	{
    		while (ch == '\b')
    			{	
    				cin>>ch;
    			}
    		if (ch >= '0' && ch <= '9')
    			{	
    			int number = 0;
    					while (ch != 'b')
    					{	
    						number = (number*10) + (ch-'0');
    						cin>>ch;
    					
    			}
    		// push into stack around here i think
    	}
    
    }
    this is probably incoherent as am i. Guess i learned to save everything before i post it here

    thansk in advance if anyone can help
    ~R

  2. #2
    Registered User
    Join Date
    Apr 2005
    Posts
    2
    and yes i see i missed a } after a while statement

    sooo tired

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Terminating secondary thread from another thread
    By wssoh85 in forum C++ Programming
    Replies: 13
    Last Post: 12-19-2008, 05:14 AM
  2. Thread Prog in C language (seg fault)
    By kumars in forum C Programming
    Replies: 22
    Last Post: 10-09-2008, 02:17 PM
  3. Calling a Thread with a Function Pointer.
    By ScrollMaster in forum Windows Programming
    Replies: 6
    Last Post: 06-10-2006, 09:56 AM
  4. pointer to main thread from worker thread?
    By draegon in forum C++ Programming
    Replies: 2
    Last Post: 10-27-2005, 07:35 AM
  5. Critical Sections, destroying
    By Hunter2 in forum Windows Programming
    Replies: 4
    Last Post: 09-02-2003, 11:36 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21