I got a nice bit of code running very smoothly on the console and now have to implement the gui. The problem is that printf() doesn't seem to work too well without a target for output.
Would anyone be able to point me to a site that explains how to redirect the output to an mfc control(like a...
You guys are not gonna believe this.
In frustration, I tried creating a new class that did nothing and boom it works. I then named that class FILESCHEMA and boom, it broke. I renamed the class I was having trouble with to myfilescema...boom it works.
So apparently there is something wrong...
In Java, that is called prototyping. I just assumed that you do the same thing in C++. Here is the fully definition:
class FILESCHEMA
{
filename thisfile;
bool is_dir;
public:
struct subdir
{
FILESCHEMA * subfiles [MAXNUMOFFILES]; //array containing subdirectory filenames...
FILECHEMA.h is just a standard .h file created automatically by VC++ compiler
the one that is doing all the work is directory.h:
#define SEARCHPATH "c:\\archives\\test"
#define ALLFILES "\\*"
#define ALLFILESNUM 3
#define BATFILES "\\*.bat"
#define BATFILESNUM 6
#define ALLDIR "\\*." //this is...
Now I am going crazy...I moved the class out into its own .cpp and created a definition in a header file(like good programmers should) and it is still giving me the error.
The reason I am going crazy is that now it is doing the same thing in main().
After commenting a TON of stuff out, this is...
I have this declared at the top of the actual .cpp file
class FILESCHEMA(filename currentfile, bool dirstatus);
filename is a typedef string that I created
I am new to Visual c++ (having used c, java and VB, I thought the transition would be easy) and keep running into annoying errors. Here is the latest one.
I have created a class, FILESCHEMA and created an object in the main function
FILESCHEMA myfile(SEARCHPATH, true);
for use with testing...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.