I'm pretty sure it has something to do with my global and local settings, but for the life of me, I can't seem to figure out what I'm doing wrong. I'll post my code now.
/*This is a CMD installer for the driver for PSPTYPEB for x64 systems.
This was created by Deathscreton for the ease of installation.
This program creation started on 7/25/2010 at 12:28 PM and was completed at
??/??/???? at ??:??. */
#include <iostream>
#include <fstream>
#include "os_check.h"
#include "file_check.h"
usingnamespace std;
void file_check();
void os_check();
void file_completion()
{
if (filecheck = 1)
{ cout<<"Program files present...\n";
system("pause");
}
else
{
cout<<"There are one or more files missing. Make sure the files are present in the folder with the installer.\n";
system("pause");
}
}
int main()
{
cout << "Welcome to the PSPTYPEB installer for x64 systems.\n";
cout << "\n";
cout << "The program will now check your system for a x64 bit OS.\n";
cout << "\n";
system("pause");
os_check();
if (oscheck == 1)
{
cout<< "This program has verified that you have a x64 bit OS running and installation will continue.\n";
cout << "\n";
cout<< "The program will pause for a brief moment....\n";
cout << "\n";
system("PAUSE");
}
elseif (oscheck == 0)
{
cout<< "This OS is not x64 bit. Exiting application...\n";
system("pause");
}
else
{
cout<< "There was a problem verifying your OS system. Please restart\n";
cout<< "the program and try again....\n";
system("pause");
}
cout<<"The program is now running a self check to ensure that all files are intact....\n";
file_check();
return 0;
}
And here are the errors. I've tried multiple things. Nothing has worked so far....
1 2 3 4 5 6 7 8 9 10
9 C:\Users\Riyo\Desktop\PSPTYPEB x64 installer\PSPTYPEBx64Installer.cpp In file included from C:\Users\Riyo\Desktop\PSPTYPEB x64 installer\PSPTYPEBx64Installer.cpp
C:\Users\Riyo\Desktop\PSPTYPEB x64 installer\file_check.h In function `void file_check()':
24 C:\Users\Riyo\Desktop\PSPTYPEB x64 installer\file_check.h `file_completion' undeclared (first use this function) (Each undeclared identifier is reported only once for each function it appears in.)
C:\Users\Riyo\Desktop\PSPTYPEB x64 installer\PSPTYPEBx64Installer.cpp In function `void file_completion()':
17 C:\Users\Riyo\Desktop\PSPTYPEB x64 installer\PSPTYPEBx64Installer.cpp `void file_completion()' used prior to declaration
/
#include <iostream>
#include <fstream>
#include "os_check.h"
#include "file_check.h"
usingnamespace std;
void file_completion();void file_check();
void os_check();
void file_completion()
{
if (filecheck = 1)
{ cout<<"Program files present...\n";
system("pause");
}
else
{
cout<<"There are one or more files missing. Make sure the files are present in the folder with the installer.\n";
system("pause");
}
}
int main()
{
cout << "Welcome to the PSPTYPEB installer for x64 systems.\n";
cout << "\n";
cout << "The program will now check your system for a x64 bit OS.\n";
cout << "\n";
system("pause");
os_check();
if (oscheck == 1)
{
cout<< "This program has verified that you have a x64 bit OS running and installation will continue.\n";
cout << "\n";
cout<< "The program will pause for a brief moment....\n";
cout << "\n";
system("PAUSE");
}
elseif (oscheck == 0)
{
cout<< "This OS is not x64 bit. Exiting application...\n";
system("pause");
}
else
{
cout<< "There was a problem verifying your OS system. Please restart\n";
cout<< "the program and try again....\n";
system("pause");
}
cout<<"The program is now running a self check to ensure that all files are intact....\n";
file_check();
return 0;
}
caused the code to compile without error. However, I'm not receiving the results I want. I'm still receiving a "all files present" message when I should be receiving a "One or more files are missing..." message. Any ideas?
Found the problem. With all my elses in the .h file with the missing errors, I need single "=" and double '=' in the file completion function. I can't figure out how I fixed the function though, even though it is fixed, I'd still like someone to clarify.