Sry if this is too windows specific but i really need help... So I'd like to scan program files and add the names of each program in a file with each of their paths. Is it possible? This is where i"m stuck:
I'd like to know if i can directly read from program files, and how i could associate each app to a number so that the user only needs to type in the number to launch his application.
Thanks in advance
Code:
#include <iostream>
#include <windows.h>
#include <fstream>
using namespace std;
int main()
{
int S1, S2;
void list();
void data();
char word[25];
cout << "\t\t *****Ultimate App Launcher*****\n\n";
cout << "[1] To Launch An App, [2] To Add an App To The List";
cin >> S1;
switch (S1)
{
case 1:
list();
cout << "Now Enter The Number Matching The App You Want To Launche";
cin >> S2;
void list()
{
ifstream File("Name.txt");
char txt;
while(!File.eof())
{
File.get(txt);
cout << txt;
}
if (!File)
{
cout << cout << "Cannot Open File. You Are Missing a File of Name **Name.txt**\n\nLocate It, Then Place It Next To The Program File.\n\n";
return 1;
}
File.close();
}
Thanks in advance