15 Replies - 4168 Views - Last Post: 24 January 2012 - 09:37 AM
#1
How to make a program that opens another program?
Posted 06 December 2010 - 10:26 PM
Replies To: How to make a program that opens another program?
#2
Re: How to make a program that opens another program?
Posted 06 December 2010 - 10:27 PM
#3
Re: How to make a program that opens another program?
Posted 06 December 2010 - 10:32 PM
Do you mean a disassembler?
Which Operating System? What do you want the program to do once it's open? Launch it, read it, edit it?
The more information you can give us, the less we have to poke & prod.
#4
Re: How to make a program that opens another program?
Posted 06 December 2010 - 11:18 PM
#5
Re: How to make a program that opens another program?
Posted 06 December 2010 - 11:29 PM
#6
Re: How to make a program that opens another program?
Posted 06 December 2010 - 11:35 PM
hokon86, on 07 December 2010 - 12:18 AM, said:
Please provide more detail.
For example.
Bad example
How to drive a car :
Step one, put car in drive
Step two, drive car.
Good example
How to drive a car :
Step one, locate keys
Step two, open car door
Step three, adjust mirrors
Step four, fasten seat belt
Step five, check mirrors for objects that are in direction you will move the car
Step six, insert keys into ignition
Step seven, turn ignition & listen for car to start engine
Step eight, if no objects, press on break, then use gear shifter to place car into drive (for forward) or reverse (for backwards).
... & so on...
We can't help you unless we can understand you. Please tell us what you are trying to do & we'll do our best.
#7
Re: How to make a program that opens another program?
Posted 06 December 2010 - 11:47 PM
#8
Re: How to make a program that opens another program?
Posted 07 December 2010 - 12:39 AM
ShellExecute(NULL, "open", "http://www.dreamincode.net", NULL, NULL, SW_SHOWNORMAL);
Also using Related Topicsbeta you may have come across this thread, which also answers the same questions.
This post has been edited by DaneAU: 07 December 2010 - 12:46 AM
#9
Re: How to make a program that opens another program?
Posted 07 December 2010 - 12:47 AM
hokon86, on 06 December 2010 - 10:47 PM, said:
Obviously you do not care for our advice, otherwise you would have elaborated on your actual problem as no2pencil suggested. Repeating an almost identical question three seperate times is not in any way helping us help you.
#10
Re: How to make a program that opens another program?
Posted 07 December 2010 - 01:04 AM
hokon86, on 06 December 2010 - 09:47 PM, said:
mmmm.... lunch... omnomnomnom
wait... you didn't mean to ask for a program that lunches another program?
depending on what you want (if you would follow the advice given, as no2pencil suggested, there wouldn't be a question) you could do a simple system call using system();, or for windows (of which a system call will also work) you can also use ShellExecute();, as DaneAU posted
I still like the idea of a program that makes me lunch....
This post has been edited by Gorian: 07 December 2010 - 01:05 AM
#11
Re: How to make a program that opens another program?
Posted 07 December 2010 - 01:25 AM
#12
Re: How to make a program that opens another program?
Posted 07 December 2010 - 01:33 AM
#13
Re: How to make a program that opens another program?
Posted 07 December 2010 - 01:51 AM
Also, people are less likely to help you, and offer advice to solve the problem you want help with if they can't understand what the problem is, and you don't show an inclination to follow the advice that they do give. Should this change, you will garner better responses from us, and less people would make jokes relating to your posts (unless you are in the lounge
EDIT: Spelling
This post has been edited by Gorian: 07 December 2010 - 01:55 PM
#14
Re: How to make a program that opens another program?
Posted 24 January 2012 - 09:00 AM
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <iostream>
#include <string>
#include <windows.h>
main()
{
int op1 ,op2;
printf("\t\t---------------Menu---------------\n");
printf("\t\t\t 1-> ficha 1. \n");
printf("\t\t\t 2-> ficha 2. \n");
printf("\t\t\t 3-> ficha 3. \n");
printf("\t\t\t 4-> ficha 4. \n");
printf("\t\t\t 5-> ficha 5. \n");
printf("\t\t\t 6-> ficha 6. \n");
printf("\t\t\t 7-> ficha 7. \n");
printf("\t\t\t 8-> ficha 8. \n");
printf("\t\t\t 0-> Sair. \n");
scanf(" %d", &op1);
switch (op1)
{
case 1:printf("\t\t-----------MenuFicha1----------\n");
printf("\t\t\t 1-> ex 1. \n");
printf("\t\t\t 2-> ex 2. \n");
printf("\t\t\t 3-> ex 3. \n");
printf("\t\t\t 4-> ex 4. \n");
printf("\t\t\t 5-> ex 5. \n");
printf("\t\t\t 6-> ex 6. \n");
printf("\t\t\t 7-> ex 7. \n");
scanf(" %d", &op2);
switch (op2)
{
case 1:char path0[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 1\\ex1.exe\"";
system(path0);break;
case 2:char path1[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 1\\ex2.exe\"";
system(path1);break;
case 3:char path2[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 1\\ex3.exe\"";
system(path2);break;
case 4:char path3[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 1\\ex4.exe\"";
system(path3);break;
case 5:char path4[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 1\\ex5.exe\"";
system(path4);break;
case 6:char path5[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 1\\ex6.exe\"";
system(path5);break;
case 7:char path6[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 1\\ex7.exe\"";
system(path6);break;break;}
case 2:printf("\t\t-----------MenuFicha2----------\n");
printf("\t\t\t 1-> ex 1. \n");
printf("\t\t\t 2-> ex 2. \n");
printf("\t\t\t 3-> ex 3. \n");
printf("\t\t\t 4-> ex 4. \n");
printf("\t\t\t 5-> ex 5. \n");
printf("\t\t\t 6-> ex 6. \n");
printf("\t\t\t 7-> ex 7. \n");
printf("\t\t\t 8-> ex 8. \n");
scanf(" %d", &op2);
switch (op2)
{
case 1:char path7[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 2\\ex1.exe\"";
system(path7);break;
case 2:char path8[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 2\\ex2.exe\"";
system(path8);break;
case 3:char path9[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 2\\ex3.exe\"";
system(path9);break;
case 4:char path10[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 2\\ex4.exe\"";
system(path10);break;
case 5:char path11[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 2\\ex5.exe\"";
system(path11);break;
case 6:char path12[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 2\\ex6.exe\"";
system(path12);break;
case 7:char path13[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 2\\ex7.exe\"";
system(path13);break;
case 8:char path14[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 2\\ex8.exe\"";
system(path14);break;break;}
case 3:printf("\t\t-----------MenuFicha3----------\n");
printf("\t\t\t 1-> ex 1. \n");
printf("\t\t\t 2-> ex 2. \n");
printf("\t\t\t 3-> ex 3. \n");
printf("\t\t\t 4-> ex 4. \n");
printf("\t\t\t 5-> ex 5. \n");
scanf(" %d", &op2);
switch (op2)
{
case 1:char path15[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 3\\ex1.exe\"";
system(path15);break;
case 2:char path16[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 3\\ex2.exe\"";
system(path16);break;
case 3:char path17[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 3\\ex3.exe\"";
system(path17);break;
case 4:char path18[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 3\\ex4.exe\"";
system(path18);break;
case 5:char path19[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 3\\ex5.exe\"";
system(path19);break;break;}
case 4:printf("\t\t-----------MenuFicha4----------\n");
printf("\t\t\t 1-> ex 1. \n");
printf("\t\t\t 2-> ex 2. \n");
printf("\t\t\t 3-> ex 3. \n");
printf("\t\t\t 4-> ex 4. \n");
printf("\t\t\t 5-> ex 5. \n");
printf("\t\t\t 6-> ex 6. \n");
printf("\t\t\t 7-> ex 7. \n");
scanf(" %d", &op2);
switch (op2)
{
case 1:char path20[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 4\\ex1.exe\"";
system(path20);break;
case 2:char path21[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 4\\ex2.exe\"";
system(path21);break;
case 3:char path22[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 4\\ex3.exe\"";
system(path22);break;
case 4:char path23[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 4\\ex4.exe\"";
system(path23);break;
case 5:char path24[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 4\\ex5.exe\"";
system(path24);break;
case 6:char path25[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 4\\ex6.exe\"";
system(path25);break;
case 7:char path26[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 4\\ex7.exe\"";
system(path26);break;break;}
case 5:printf("\t\t-----------MenuFicha5----------\n");
printf("\t\t\t 1-> ex 1. \n");
printf("\t\t\t 2-> ex 2. \n");
printf("\t\t\t 3-> ex 3. \n");
printf("\t\t\t 4-> ex 4. \n");
printf("\t\t\t 5-> ex 5. \n");
scanf(" %d", &op2);
switch (op2)
{
case 1:char path27[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 5\\ex1.exe\"";
system(path27);break;
case 2:char path28[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 5\\ex2.exe\"";
system(path28);break;
case 3:char path29[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 5\\ex3.exe\"";
system(path29);break;
case 4:char path30[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 5\\ex4.exe\"";
system(path30);break;
case 5:char path31[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 5\\ex5.exe\"";
system(path31);break;break;}
case 6:printf("\t\t-----------MenuFicha6----------\n");
printf("\t\t\t 1-> ex 1. \n");
printf("\t\t\t 2-> ex 2. \n");
printf("\t\t\t 3-> ex 3. \n");
printf("\t\t\t 4-> ex 4. \n");
printf("\t\t\t 5-> ex 5. \n");
printf("\t\t\t 6-> ex 6. \n");
printf("\t\t\t 7-> ex 7. \n");
printf("\t\t\t 8-> ex 8. \n");
printf("\t\t\t 9-> ex 9. \n");
printf("\t\t\t 10-> ex 10. \n");
printf("\t\t\t 11-> ex 11. \n");
scanf(" %d", &op2);
switch (op2)
{
case 1:char path32[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 6\\ex1.exe\"";
system(path32);break;
case 2:char path33[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 6\\ex2.exe\"";
system(path33);break;
case 3:char path34[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 6\\ex3.exe\"";
system(path34);break;
case 4:char path35[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 6\\ex4.exe\"";
system(path35);break;
case 5:char path36[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 6\\ex5.exe\"";
system(path36);break;
case 6:char path37[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 6\\ex6.exe\"";
system(path37);break;
case 7:char path38[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 6\\ex7.exe\"";
system(path38);break;
case 8:char path39[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 6\\ex8.exe\"";
system(path39);break;
case 9:char path40[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 6\\ex9.exe\"";
system(path40);break;
case 10:char path41[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 6\\ex10.exe\"";
system(path41);break;
case 11:char path42[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 6\\ex11.exe\"";
system(path42);break;break;}
case 7:printf("\t\t-----------MenuFicha7----------\n");
printf("\t\t\t 1-> ex 1. \n");
printf("\t\t\t 2-> ex 2. \n");
printf("\t\t\t 3-> ex 3. \n");
printf("\t\t\t 4-> ex 4. \n");
printf("\t\t\t 5-> ex 5. \n");
printf("\t\t\t 6-> ex 6. \n");
printf("\t\t\t 7-> ex 7. \n");
printf("\t\t\t 8-> ex 8. \n");
scanf(" %d", &op2);
switch (op2)
{
case 1:char path43[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 7\\ex1.exe\"";
system(path43);break;
case 2:char path44[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 7\\ex2.exe\"";
system(path44);break;
case 3:char path45[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 7\\ex3.exe\"";
system(path45);break;
case 4:char path46[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 7\\ex4.exe\"";
system(path46);break;
case 5:char path47[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 7\\ex5.exe\"";
system(path47);break;
case 6:char path48[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 7\\ex6.exe\"";
system(path48);break;
case 7:char path49[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 7\\ex7.exe\"";
system(path49);break;break;}
case 8:printf("\t\t-----------MenuFicha8----------\n");
printf("\t\t\t 1-> ex 1. \n");
printf("\t\t\t 2-> ex 2. \n");
printf("\t\t\t 3-> ex 3. \n");
printf("\t\t\t 4-> ex 4. \n");
printf("\t\t\t 5-> ex 5. \n");
printf("\t\t\t 6-> ex 6. \n");
printf("\t\t\t 7-> ex 7. \n");
printf("\t\t\t 8-> ex 8. \n");
scanf(" %d", &op2);
switch (op2)
{
case 1:char path50[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 8\\ex1.exe\"";
system(path50);break;
case 2:char path51[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 8\\ex2.exe\"";
system(path51);break;
case 3:char path52[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 8\\ex3.exe\"";
system(path52);break;
case 4:char path53[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 8\\ex4.exe\"";
system(path53);break;
case 5:char path54[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 8\\ex5.exe\"";
system(path54);break;break;}
}
system("pause");
}
its giving me next error:
37 C:\Users\David\Desktop\Escola\PSI\ex\Fzer.cpp jump to case label
35 C:\Users\David\Desktop\Escola\PSI\ex\Fzer.cpp crosses initialization of `char path0[52]'
it gives me this kinda error lots of times.
im using dev c++4.9.9.2 .
hope u can help
#15
Re: How to make a program that opens another program?
Posted 24 January 2012 - 09:13 AM
GoldOnFire, on 24 January 2012 - 09:00 AM, said:
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <iostream>
#include <string>
#include <windows.h>
main()
{
int op1 ,op2;
printf("\t\t---------------Menu---------------\n");
printf("\t\t\t 1-> ficha 1. \n");
printf("\t\t\t 2-> ficha 2. \n");
printf("\t\t\t 3-> ficha 3. \n");
printf("\t\t\t 4-> ficha 4. \n");
printf("\t\t\t 5-> ficha 5. \n");
printf("\t\t\t 6-> ficha 6. \n");
printf("\t\t\t 7-> ficha 7. \n");
printf("\t\t\t 8-> ficha 8. \n");
printf("\t\t\t 0-> Sair. \n");
scanf(" %d", &op1);
switch (op1)
{
case 1:printf("\t\t-----------MenuFicha1----------\n");
printf("\t\t\t 1-> ex 1. \n");
printf("\t\t\t 2-> ex 2. \n");
printf("\t\t\t 3-> ex 3. \n");
printf("\t\t\t 4-> ex 4. \n");
printf("\t\t\t 5-> ex 5. \n");
printf("\t\t\t 6-> ex 6. \n");
printf("\t\t\t 7-> ex 7. \n");
scanf(" %d", &op2);
switch (op2)
{
case 1:char path0[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 1\\ex1.exe\"";
system(path0);break;
case 2:char path1[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 1\\ex2.exe\"";
system(path1);break;
case 3:char path2[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 1\\ex3.exe\"";
system(path2);break;
case 4:char path3[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 1\\ex4.exe\"";
system(path3);break;
case 5:char path4[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 1\\ex5.exe\"";
system(path4);break;
case 6:char path5[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 1\\ex6.exe\"";
system(path5);break;
case 7:char path6[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 1\\ex7.exe\"";
system(path6);break;break;}
case 2:printf("\t\t-----------MenuFicha2----------\n");
printf("\t\t\t 1-> ex 1. \n");
printf("\t\t\t 2-> ex 2. \n");
printf("\t\t\t 3-> ex 3. \n");
printf("\t\t\t 4-> ex 4. \n");
printf("\t\t\t 5-> ex 5. \n");
printf("\t\t\t 6-> ex 6. \n");
printf("\t\t\t 7-> ex 7. \n");
printf("\t\t\t 8-> ex 8. \n");
scanf(" %d", &op2);
switch (op2)
{
case 1:char path7[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 2\\ex1.exe\"";
system(path7);break;
case 2:char path8[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 2\\ex2.exe\"";
system(path8);break;
case 3:char path9[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 2\\ex3.exe\"";
system(path9);break;
case 4:char path10[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 2\\ex4.exe\"";
system(path10);break;
case 5:char path11[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 2\\ex5.exe\"";
system(path11);break;
case 6:char path12[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 2\\ex6.exe\"";
system(path12);break;
case 7:char path13[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 2\\ex7.exe\"";
system(path13);break;
case 8:char path14[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 2\\ex8.exe\"";
system(path14);break;break;}
case 3:printf("\t\t-----------MenuFicha3----------\n");
printf("\t\t\t 1-> ex 1. \n");
printf("\t\t\t 2-> ex 2. \n");
printf("\t\t\t 3-> ex 3. \n");
printf("\t\t\t 4-> ex 4. \n");
printf("\t\t\t 5-> ex 5. \n");
scanf(" %d", &op2);
switch (op2)
{
case 1:char path15[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 3\\ex1.exe\"";
system(path15);break;
case 2:char path16[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 3\\ex2.exe\"";
system(path16);break;
case 3:char path17[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 3\\ex3.exe\"";
system(path17);break;
case 4:char path18[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 3\\ex4.exe\"";
system(path18);break;
case 5:char path19[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 3\\ex5.exe\"";
system(path19);break;break;}
case 4:printf("\t\t-----------MenuFicha4----------\n");
printf("\t\t\t 1-> ex 1. \n");
printf("\t\t\t 2-> ex 2. \n");
printf("\t\t\t 3-> ex 3. \n");
printf("\t\t\t 4-> ex 4. \n");
printf("\t\t\t 5-> ex 5. \n");
printf("\t\t\t 6-> ex 6. \n");
printf("\t\t\t 7-> ex 7. \n");
scanf(" %d", &op2);
switch (op2)
{
case 1:char path20[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 4\\ex1.exe\"";
system(path20);break;
case 2:char path21[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 4\\ex2.exe\"";
system(path21);break;
case 3:char path22[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 4\\ex3.exe\"";
system(path22);break;
case 4:char path23[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 4\\ex4.exe\"";
system(path23);break;
case 5:char path24[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 4\\ex5.exe\"";
system(path24);break;
case 6:char path25[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 4\\ex6.exe\"";
system(path25);break;
case 7:char path26[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 4\\ex7.exe\"";
system(path26);break;break;}
case 5:printf("\t\t-----------MenuFicha5----------\n");
printf("\t\t\t 1-> ex 1. \n");
printf("\t\t\t 2-> ex 2. \n");
printf("\t\t\t 3-> ex 3. \n");
printf("\t\t\t 4-> ex 4. \n");
printf("\t\t\t 5-> ex 5. \n");
scanf(" %d", &op2);
switch (op2)
{
case 1:char path27[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 5\\ex1.exe\"";
system(path27);break;
case 2:char path28[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 5\\ex2.exe\"";
system(path28);break;
case 3:char path29[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 5\\ex3.exe\"";
system(path29);break;
case 4:char path30[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 5\\ex4.exe\"";
system(path30);break;
case 5:char path31[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 5\\ex5.exe\"";
system(path31);break;break;}
case 6:printf("\t\t-----------MenuFicha6----------\n");
printf("\t\t\t 1-> ex 1. \n");
printf("\t\t\t 2-> ex 2. \n");
printf("\t\t\t 3-> ex 3. \n");
printf("\t\t\t 4-> ex 4. \n");
printf("\t\t\t 5-> ex 5. \n");
printf("\t\t\t 6-> ex 6. \n");
printf("\t\t\t 7-> ex 7. \n");
printf("\t\t\t 8-> ex 8. \n");
printf("\t\t\t 9-> ex 9. \n");
printf("\t\t\t 10-> ex 10. \n");
printf("\t\t\t 11-> ex 11. \n");
scanf(" %d", &op2);
switch (op2)
{
case 1:char path32[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 6\\ex1.exe\"";
system(path32);break;
case 2:char path33[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 6\\ex2.exe\"";
system(path33);break;
case 3:char path34[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 6\\ex3.exe\"";
system(path34);break;
case 4:char path35[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 6\\ex4.exe\"";
system(path35);break;
case 5:char path36[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 6\\ex5.exe\"";
system(path36);break;
case 6:char path37[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 6\\ex6.exe\"";
system(path37);break;
case 7:char path38[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 6\\ex7.exe\"";
system(path38);break;
case 8:char path39[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 6\\ex8.exe\"";
system(path39);break;
case 9:char path40[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 6\\ex9.exe\"";
system(path40);break;
case 10:char path41[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 6\\ex10.exe\"";
system(path41);break;
case 11:char path42[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 6\\ex11.exe\"";
system(path42);break;break;}
case 7:printf("\t\t-----------MenuFicha7----------\n");
printf("\t\t\t 1-> ex 1. \n");
printf("\t\t\t 2-> ex 2. \n");
printf("\t\t\t 3-> ex 3. \n");
printf("\t\t\t 4-> ex 4. \n");
printf("\t\t\t 5-> ex 5. \n");
printf("\t\t\t 6-> ex 6. \n");
printf("\t\t\t 7-> ex 7. \n");
printf("\t\t\t 8-> ex 8. \n");
scanf(" %d", &op2);
switch (op2)
{
case 1:char path43[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 7\\ex1.exe\"";
system(path43);break;
case 2:char path44[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 7\\ex2.exe\"";
system(path44);break;
case 3:char path45[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 7\\ex3.exe\"";
system(path45);break;
case 4:char path46[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 7\\ex4.exe\"";
system(path46);break;
case 5:char path47[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 7\\ex5.exe\"";
system(path47);break;
case 6:char path48[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 7\\ex6.exe\"";
system(path48);break;
case 7:char path49[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 7\\ex7.exe\"";
system(path49);break;break;}
case 8:printf("\t\t-----------MenuFicha8----------\n");
printf("\t\t\t 1-> ex 1. \n");
printf("\t\t\t 2-> ex 2. \n");
printf("\t\t\t 3-> ex 3. \n");
printf("\t\t\t 4-> ex 4. \n");
printf("\t\t\t 5-> ex 5. \n");
printf("\t\t\t 6-> ex 6. \n");
printf("\t\t\t 7-> ex 7. \n");
printf("\t\t\t 8-> ex 8. \n");
scanf(" %d", &op2);
switch (op2)
{
case 1:char path50[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 8\\ex1.exe\"";
system(path50);break;
case 2:char path51[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 8\\ex2.exe\"";
system(path51);break;
case 3:char path52[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 8\\ex3.exe\"";
system(path52);break;
case 4:char path53[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 8\\ex4.exe\"";
system(path53);break;
case 5:char path54[] = "\"C:\\Users\\David\\Desktop\\Escola\\PSI\\ficha 8\\ex5.exe\"";
system(path54);break;break;}
}
system("pause");
}
its giving me next error:
37 C:\Users\David\Desktop\Escola\PSI\ex\Fzer.cpp jump to case label
35 C:\Users\David\Desktop\Escola\PSI\ex\Fzer.cpp crosses initialization of `char path0[52]'
it gives me this kinda error lots of times.
im using dev c++4.9.9.2 .
hope u can help
I just puked.
|
|

New Topic/Question
Reply




MultiQuote





|