problem with arrays

Hello,

I am writing a code using 2d and 3d arrays. I am using code::blocks with Windows XP. The first part of the code deals with entering variables and the second part is the execution. There is no problem with entering the data but once execution starts I get this error message and execution terminates:


errors, 0 warnings

Checking for existence: C:\Dev-Cpp\first-part.exe
Executing: C:\Program Files\CodeBlocks/cb_console_runner.exe "C:\Dev-Cpp\first-part.exe" (in C:\Dev-Cpp)
Process terminated with status -1073741819 (0 minutes, 38 seconds)


Any help on this is appreciated...


are you sure there is no problem with your code?

process termination with any status but ZERO is usually a sign that something didn't go right

I would print out results from your code or go through the debugger or write a unit-test to verify that the code is working properly
How do I write a unit test to verify my code. I am not familiar with that. The debugger is there but when I click on it nothing happens...I tried the same code with DEV C++ no error occurs but since the code is still incomplete I can't tell for sure what happened.
Last edited on
I use:
http://code.google.com/p/googletest/

however, you can use any package that works well with your IDE:
http://wiki.codeblocks.org/index.php?title=UnitTesting
1) Ok so when I compile the code using code::blocks on Windows XP, I get this message:

Compiling: C:\Dev-Cpp\first-part.cpp
Linking console executable: C:\Dev-Cpp\first-part.exe
Process terminated with status 0 (0 minutes, 2 seconds)
0 errors, 0 warnings

and when I build and run the code I get this message:


Checking for existence: C:\Dev-Cpp\first-part.exe
Executing: C:\Program Files\CodeBlocks/cb_console_runner.exe "C:\Dev-Cpp\first-part.exe" (in C:\Dev-Cpp)
Process terminated with status -1073741819 (0 minutes, 21 seconds)

What's the difference between the two and how do I mitigate this and make it work?


2) I have an open file process as follows:

fstream myfile;
myfile.open ("data1.txt");

myfile << " p\n";
myfile << " ydisplacement2\n";

But when I run the code as explained above I never find this file on my hard drive. I am not sure what is going wrong.

Any help is appreciated.



Topic archived. No new replies allowed.