| | |
c++ error message system cannot find file specified
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
when I compile, there are no errors, but when I run the program it tells me there are build errors and then "the system cannot find the file specified." I have copied and restarted a new project, then new item and still get same error message. Can someone tell me what the error is? Thanks.
#include <iostream>
using namespace std;
class testClass
{public:
int sum();
void print();
testClass();
testClass(int a, int b);
private:
int x;
int y;
};
int testClass :: sum ()
{return x + y;}
testClass :: testClass (int a, int b)
{ x=a, y=b ; }
testClass :: testClass ()
{ x=0, y=0 ; }
void print ()
{cout << "Sum of one, a + b = " << endl;
cout << "Sum of two, a + b = " << endl;
}
/* an entry point for program execution */
int main()
{
testClass one; //default constructor called
testClass two (2,2); //constructor with 2 values called
one.print();
two.print();
}
#include <iostream>
using namespace std;
class testClass
{public:
int sum();
void print();
testClass();
testClass(int a, int b);
private:
int x;
int y;
};
int testClass :: sum ()
{return x + y;}
testClass :: testClass (int a, int b)
{ x=a, y=b ; }
testClass :: testClass ()
{ x=0, y=0 ; }
void print ()
{cout << "Sum of one, a + b = " << endl;
cout << "Sum of two, a + b = " << endl;
}
/* an entry point for program execution */
int main()
{
testClass one; //default constructor called
testClass two (2,2); //constructor with 2 values called
one.print();
two.print();
}
-7
#2 Oct 25th, 2009
>>when I compile, there are no errors,
Ditch the compiler and use a different one. There is a link error.
>>void print ()
Wrong. should be
Ditch the compiler and use a different one. There is a link error.
>>void print ()
Wrong. should be
void testClass::print () Last edited by Ancient Dragon; Oct 25th, 2009 at 10:24 pm.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
•
•
•
•
>>when I compile, there are no errors,
Ditch the compiler and use a different one. There is a link error.
>>void print ()
Wrong. should bevoid testClass::print ()
Thanks!
Last edited by Gem74; Oct 25th, 2009 at 10:47 pm.
![]() |
Similar Threads
- Error during install of sql express 2005 as a pre-requisite in vb.net setup (VB.NET)
- A File That Is Required to Run Search Companion Cannot Be Found (Windows NT / 2000 / XP)
- problem with running an array (Java)
- system cannot find the file specified (Windows NT / 2000 / XP)
- Perl Error Message-assistance requested (Perl)
- Error Message: Cannot find server; page cannot be displayed (Viruses, Spyware and other Nasties)
- XP Recovery Disk - Can't Find File - Why? (Windows NT / 2000 / XP)
- Error message when starting Microsoft Word (Windows 95 / 98 / Me)
Other Threads in the C++ Forum
- Previous Thread: Help with Functions
- Next Thread: Returning solution from Python to C++
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code compile compiler console conversion convert count data delete deploy dll download dynamiccharacterarray email encryption error file format forms fstream function functions game givemetehcodez graph homeworkhelp iamthwee ifstream input int java lib library lines list loop looping loops map math matrix memory newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg search simple sorting spoonfeeding string strings struct temperature template templates text text-file tree url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets






