Sarah's Kinda Helpful Web Site Logo!!!
 
  Home : OU-ers' sites : MT262 resources : MT262 FAQs  
  MT262 FAQs... or... it's not just me asking about that!!  
 

I've compiled a few FAQs gathered from the various MT262 resources and popped them into a handy list for those currently "suffering" MT262 problems! I can't claim credit for writing what follows, but I can tell you that the ones I've tried... have worked a treat!!


 
   
Top

Starting a new project:

1. Open a new console application in Builder:

- Select File ... New
- Double-click the "Console Wizard" icon
- The "Window Type" should be "Console"
- The "Execution Type" should be "EXE"
- Include Visual Components Library must be ticked.

2. Save the project in a suitable place with a suitable file name:

- Select File .... Save Project As

3. Add any libraries to the project (especially the MT262io one!):

- Select Project .... Add to Project
- You many need to change the file type from *.cpp to *.lib
- Select MT262io.lib
- Repeat above steps for any other relevant libraries

4. Add the appropriate header files:

- type in "#include "MT262io.h" just before the line "#pragma hrdstop"
- repeat for any other relevant header files

5. Add the statement required to hold the screen output:

- type in "getchar();" on the line before before "return 0;"

Katherine Childs

 
Top

Statement missing:

  • Just insert a semicolon (;) at end of line before the highlighted statement and that should do the trick!
 
 

"Undefined..."

Either...

1. Misspelled identifier: check upper and lower case letters... C++ is case-sensitive, so be careful!

or...

2. Missing header file: ensure that any #include and USE...(...) statements are specified

 
Top

Linker error "undefined"...

  • File not correctly added to project. Use Project ... Add to project to try this again
 
 

Error: "Runtime error 216 at ...." when closing Builder

  • Go to the Builder shortcut on the desktop
  • Right-click and select Properties
  • In the "Target" box put "-NS" at the end of the line and click on "OK"
 
Top

Changing the colour of the Run Window...

  • Include the following in your main program coding:

    textattr(0xF0);
    clrscr();

  • This will result in black font used against a white background.

Karen M. Baker

 
 

Common syntax errors...

  • Typos - and especially misspelled identifiers... C++ is case sensitive... so watch out!
  • Typing '='when you mean '=='... remember, '=' means "assigned to" and '==' means "is equal to" (at the design stage this is shown as "=" which adds to the confusion... doesn't it!!)
  • Missing variable declarations... if you use a variable in your code - remember to declare it
  • Missing out round brackets... all conditions (if, while and the like) need 'em!
  • Missing out those pesky semi-colons!
  • Putting braces (those curly {} brackets to us common folk) in the wrong place... or missing 'em out!
 
Site Map
Top
 
Last update
11 January, 2004
Any feedback for me? Any other common C++ Builder errors I should have mentioned? Let me know!
 
Valid HTML 4.01!