| |

VerySource

 Forgot password?
 Register
Search
View: 670|Reply: 2

Switch problem, help look.

[Copy link]

2

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-2-15 19:00:02
| Show all posts |Read mode
switch (GongNeng)
{
case IDC_RADIO1:

ifstream fin0 (File_Name, ios :: nocreate | ios :: binary
char temp;
fin0.seekg (120, ios :: beg);
fin0.get (temp);
Station_Num = temp;
fin0.close ();
         ...
         case IDC_RADIO2:
          break;
         case IDC_RADIO3:
          break;
}
C:\Documents and Settings\Administrator\Desktop\0104\YourDlg.cpp (351): error C2360: initialization of 't' is skipped by 'case' label
        C:\Documents and Settings\Administrator\Desktop\0104\YourDlg.cpp (327): see declaration of 't'
C:\Documents and Settings\Administrator\Desktop\0104\YourDlg.cpp (351): error C2360: initialization of 'fin1' is skipped by 'case' label
        C:\Documents and Settings\Administrator\Desktop\0104\YourDlg.cpp (265): see declaration of 'fin1'
C:\Documents and Settings\Administrator\Desktop\0104\YourDlg.cpp (351): error C2360: initialization of 'fin' is skipped by 'case' label
        C:\Documents and Settings\Administrator\Desktop\0104\YourDlg.cpp (252): see declaration of 'fin'
C:\Documents and Settings\Administrator\Desktop\0104\YourDlg.cpp (351): error C2360: initialization of 'fin0' is skipped by 'case' label
        C:\Documents and Settings\Administrator\Desktop\0104\YourDlg.cpp (244): see declaration of 'fin0'
Reply

Use magic Report

0

Threads

9

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-4-16 01:45:01
| Show all posts
Please put the definition outside the switch, or add {} under the case
Reply

Use magic Report

2

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-4-17 16:00:01
| Show all posts
Ok i change it
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list