Results 1 to 25 of 44

Thread: switch C++

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Nov:2008
    Location: Sofia, Mladost 3
    Posts: 311

    switch C++

    switch , .
    :
    if ()
    {
    switch()
    {
    case1:.....
    case2:....
    }
    |
    else if ( )
    switch(a) - switch- , .

  2. #2
    Atheist Domsdey's Avatar
    Join Date: Oct:2011
    Location:
    Posts: 55
    , .
    Code:
    class example {
    int letsSwitch(int a) {
     switch(a) {
     case.....
    }
    }
    }
    main-
    Code:
    if() {
    b = letsSwitch(b);
    } else {
    if() {
    b = letsSwitch(b);
    }
    }
    ..

  3. #3
    Registered User
    Join Date: Nov:2008
    Location: Sofia, Mladost 3
    Posts: 311
    , ( ) . 72 "sedemdeset i dve". 100 case-a, 0 100.

  4. #4
    Exhumator's Avatar
    Join Date: Jan:2005
    Location: Sofia
    Posts: 14,687
    switch 2 ( ), if switch?!?

    Code:
    if (() || ( ))
    {
       switch()
       {
          case1:.....
          case2:....
       }
    }
    | Aorus X570 Master | Ryzen 9 5900X | Hellhound 7900XT | G.SKILL 32GB DDR4 3800 CL16 | Enermax Galaxy 1000W | SSD Corsair MP510 960GB & WD-RE3 2 x 1TB RAID0 | Pioneer BDR-209EBK | Creative X-Fi Titanium Fatal1ty & GigaWorks S750 | ViewSonic VX3276-2K-MHD |

  5. #5
    Registered User
    Join Date: Oct:2003
    Location:
    Posts: 4,317
    if . , , .

  6. #6
    Registered User
    Join Date: Nov:2008
    Location: Sofia, Mladost 3
    Posts: 311
    . switch c 9 case- 1 9 - A=33 3 "trideset i " << switch-a.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |