Thread: Switch

  1. #1
    Registered User
    Join Date
    Dec 2012
    Posts
    23

    Switch

    Hey amigos!

    I wanted to ask if someone can explain to me how the "Switch" Command works, and if it might be the solution to my problem:

    I got a 2d array. Every 2nd row has operand=getchar();

    In it, the getchar returns the value of +,-,/,*

    I want to make it able to do calculations with them.... like:

    array [0][0] array[1][0] array[2][0], where array[1][0] is the operand that it contains...

    Any suggestions?

  2. #2
    Registered User
    Join Date
    Sep 2012
    Posts
    68
    Quote Originally Posted by Gal Abir View Post

    I wanted to ask if someone can explain to me how the "Switch" Command works, and if it might be the solution to my problem:
    Have a look at the switch case tutorial.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Ask about switch
    By micheal9000 in forum C Programming
    Replies: 6
    Last Post: 10-21-2010, 03:23 PM
  2. Do..While in a Switch
    By MPQC in forum C++ Programming
    Replies: 2
    Last Post: 11-01-2009, 06:18 AM
  3. Switch help plz
    By joshua in forum C Programming
    Replies: 2
    Last Post: 11-17-2005, 09:40 PM
  4. A switch that doesn't switch
    By Death_Wraith in forum C++ Programming
    Replies: 5
    Last Post: 11-06-2004, 12:18 PM