New Posts  All Forums:Forum Nav:

Whats wrong with my code?

post #1 of 3
Thread Starter 
I'm am writing a simple file backup application, but its crashing when I try to run it. My code looks fine to me, so I was hopeing one of you fine people could tell me where my problem lies?
post #2 of 3
Thread Starter 
post #3 of 3
As I assume this is your homework or assignment, so I am not going to fix it all.

But here are a few tips.

- You should have #include <string> if you are using the string library.

- Allocating a array with 0 elements doesn't make any sense.
string dirval[0];

- You should use better variable names. Don't use both,
bool x; and string x; in the same piece of code, you will confuse yourself.

- The .exe you built was 588KB. I rebuilt your code and it was 10KB (release mode). So I don't know how you compiled it, but there is something wrong if my compiled code is 50 times smaller.

- Your program doesn't search for files in the directory the user enters, doesn't copy files, and doesn't have any way to enter a location to backup the files to. In fact doesn't contain any basic functionality that I would expect a back program t have. This would seem to be the major flaw.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Application Programming