[an error occurred while processing this directive]
[an error occurred while processing this directive]

wxDev C++

Go to http://wxdsgn.sourceforge.net/ and download the most recent release.

  • If you don't have Cygwin installed, select Dev-C++ 5.0 beta 9.2 (4.9.9.2) (9.0 MB) with Mingw/GCC 3.4.2 (devcpp-4.9.9.2_setup.exe), otherwise
  • If you have Cygwin installed, select Dev-C++ 5.0 beta 9.2 (4.9.9.2), executable only (dev-cpp-4.9.9.2_nomingw_setup.exe).

The first option is more likely to be used by most students who are not yet familiar with Unix.

Launch the installer. The destination file may not have any spaces in the name. I would suggest that you use the default C:\Dev-Cpp.

The path to the project may not have any spaces, either. Consequently, I would suggest, for example, C:\Dev-Cpp\ece250\p1a and C:\Dev-Cpp\ece250\p1b. This breaks Project 1 into two parts: one for Single_list and one for Cyclic_list. Copy all the files for Single_list into p1a and all the files for Cyclic_list, into p1b.

C:\Dev-Cpp\ece250>dir
 Volume in drive C is OS
 Volume Serial Number is 2894-1D6E

 Directory of C:\Dev-Cpp\ece250

25/09/2008  07:04 AM    <DIR>          .
25/09/2008  07:04 AM    <DIR>          ..
25/09/2008  07:04 AM    <DIR>          p1a
25/09/2008  07:04 AM    <DIR>          p1b
               0 File(s)              0 bytes
               4 Dir(s)  381,806,608,384 bytes free

C:\Dev-Cpp\ece250>dir p1a
 Volume in drive C is OS
 Volume Serial Number is 2894-1D6E

 Directory of C:\Dev-Cpp\ece250\p1a

25/09/2008  07:04 AM    <DIR>          .
25/09/2008  07:04 AM    <DIR>          ..
25/09/2008  06:30 AM            13,741 ece250.h
25/09/2008  06:30 AM               348 Exception.h
25/09/2008  08:33 AM               875 Makefile.win
25/09/2008  06:30 AM             3,224 Single_list.h
25/09/2008  06:30 AM               784 Single_list_double_driver.cpp
25/09/2008  06:30 AM               777 Single_list_int_driver.cpp
25/09/2008  06:30 AM             9,569 Single_list_tester.h
25/09/2008  06:30 AM             1,737 Single_node.h
25/09/2008  06:30 AM             2,442 Single_node_tester.h
25/09/2008  06:30 AM               221 sld
25/09/2008  06:30 AM               314 sld.out
25/09/2008  06:30 AM               198 sli
25/09/2008  06:30 AM               314 sli.out
25/09/2008  06:30 AM             4,348 Tester.h
              14 File(s)         38,892 bytes
               2 Dir(s)  381,806,608,384 bytes free

C:\Dev-Cpp\ece250>dir p1b
 Volume in drive C is OS
 Volume Serial Number is 2894-1D6E

 Directory of C:\Dev-Cpp\ece250\p1b

25/09/2008  07:04 AM    <DIR>          .
25/09/2008  07:04 AM    <DIR>          ..
25/09/2008  06:30 AM             3,173 Cyclic_list.h
25/09/2008  06:30 AM            10,487 Cyclic_listTester.h
25/09/2008  06:30 AM               784 Cyclic_list_double_driver.cpp
25/09/2008  06:30 AM               775 Cyclic_list_int_driver.cpp
25/09/2008  06:30 AM            13,741 ece250.h
25/09/2008  06:30 AM               348 Exception.h
25/09/2008  06:30 AM             1,737 Single_node.h
25/09/2008  06:30 AM             2,442 Single_node_tester.h
25/09/2008  06:30 AM             4,348 Tester.h
               9 File(s)         37,835 bytes
               2 Dir(s)  381,806,608,384 bytes free

C:\Dev-Cpp\ece250>

Next, launch Dev-C++, select File→New→Project... . In the New project dialog, select an Empty Project, name the project p1a, and make sure that C++ Project is selected. Save the project in C:\Dev-cpp\ece250\p1a.

You will now see a screen with a single project labeled p1a in the left panel. Right click on that node and select Add to project. This brings up an Open File dialog and select the following files from the p1a directory.

  • ece250.h
  • Single_list.h
  • Single_list_int_driver.cpp
  • Single_list_tester.h
  • Single_node.h
  • Single_node_tester.h
  • Tester.h

Do not include Single_list_double_driver.cpp, as any project can contain at most one int main(); function. Be sure to include Tester.h.

You may now compile by selecting Execute→Clean followed by Execute→Compile. This creates an executable named p1a.exe. See the following instructions.

C:\Dev-Cpp\ece250\p1a>dir
 Volume in drive C is OS
 Volume Serial Number is 2894-1D6E

 Directory of C:\Dev-Cpp\ece250\p1a

25/09/2008  08:37 AM    <DIR>          .
25/09/2008  08:37 AM    <DIR>          ..
25/09/2008  06:30 AM            13,741 ece250.h
25/09/2008  06:30 AM               348 Exception.h
25/09/2008  08:37 AM               875 Makefile.win
25/09/2008  08:30 AM             1,603 p1a.dev
25/09/2008  08:37 AM           552,824 p1a.exe
25/09/2008  06:30 AM             3,224 Single_list.h
25/09/2008  08:25 AM               784 Single_list_double_driver.cpp
25/09/2008  06:30 AM               777 Single_list_int_driver.cpp
25/09/2008  08:37 AM            42,574 Single_list_int_driver.o
25/09/2008  06:30 AM             9,569 Single_list_tester.h
25/09/2008  06:30 AM             1,737 Single_node.h
25/09/2008  06:30 AM             2,442 Single_node_tester.h
25/09/2008  06:30 AM               221 sld
25/09/2008  06:30 AM               314 sld.out
25/09/2008  06:30 AM               198 sli
25/09/2008  06:30 AM               314 sli.out
25/09/2008  06:30 AM             4,348 Tester.h
              17 File(s)        635,893 bytes
               2 Dir(s)  381,805,944,832 bytes free

C:\Dev-Cpp\ece250\p1a>p1a.exe < sli
Starting Test Run
1 % Okay
2 % Okay
3 % Okay
4 % Okay
5 % Failure in pop_front(): expecting the value '7' but got '0'
6 % Failure in size(): expecting the value '1' but got '0'
7 % Okay
8 % Okay
9 % Failure in front(): expecting the value '7' but got '0'
10 % Failure in back(): expecting the value '3' but got '0'
11 % Failure in head(): expecting a non-null head pointer
12 % retrieve: Command not found.
13 % 7: Command not found.
14 % next: Command not found.
15 % retrieve: Command not found.
16 % 3: Command not found.
17 % next: Command not found.
18 % retrieve: Command not found.
19 % 7: Command not found.
20 % Okay
Finishing Test Run

C:\Dev-Cpp\ece250\p1a>type sli.out
Starting Test Run
1 % Okay
2 % Okay
3 % Okay
4 % Okay
5 % Okay
6 % Okay
7 % Okay
8 % Okay
9 % Okay
10 % Okay
11 % Okay
12 % Okay
13 % Okay
14 % Okay
15 % Okay
16 % Okay
17 % Okay
18 % Okay
19 % Okay
20 % Okay
21 % Okay
22 % Okay
23 % Memory allocated minus memory deallocated: 0
24 % Exiting...
Finishing Test Run

C:\Dev-Cpp\ece250\p1a>

Once you get the project working correctly (i.e., the output matches the file sli.out, remove Single_list_int_driver.cpp from the project and add Single_list_double_driver.cpp, recompile, and test this with sld.

If you select Execute→Compile & Run, you will have a Command Prompt window open with the text

Staring Test Run
1 %

At this point, you can test your class interactively.

[an error occurred while processing this directive]