# Project builder Vs. School Compiler



## Mac Osxtopus (Sep 13, 2002)

Well, as im using some borderland compiler at school to compile programs as i learn c++, some header files im taught to use dont exist for project builder, is there anyway i can dl these header files/install them? Otherwise, is there an alternative? So far i think the only missing one is conio.h used for the getch() and clrscr() functions along with(console input/output) and yes, im using a pc compiler       

oh, and could someone direct me to where i can get info on all the header files like from a website or something? Any


----------



## Mac Osxtopus (Sep 20, 2002)

oh come on... there has GOT TO BE SOMEONE WHO KNOWS CARBON OR JUST C++... IF IT ISN'T THEN MY ENTIRE HD IS NOTHING BUT COCOA?!! AHHHHHHHHHHHH!!!!!!!!!!!!!


----------



## gumse (Sep 20, 2002)

conio.h ia a Windows file, I think going back to the DOS days, used for IO at the dos prompt.. You should probably look in io.h or stdio.h for substitutions to the calls to conio.h

Just to download the .h file will not help you if the library your compiler uses don't include the calls.

Hope this helps.


----------



## Mac Osxtopus (Sep 21, 2002)

that helps somewhat, could you how me where io.h is? Sherlock won't let me index the system folder


----------



## gumse (Sep 21, 2002)

#include <stdio.h>

it's located in /usr/include/


----------



## Mac Osxtopus (Oct 6, 2002)

Neither IO or IOSTREAM .h exist in the include folder, yet when i do the #include <iostream.h> command it works just fine in project builder, is there any "unix sherlock" that i can use via terminal?   Otherwise, i'm at a dead end


----------



## gumse (Oct 7, 2002)

Unix Sherlock = find

sudo find / -name "stdio.h"

The "/" is where the search starts "/" means root level = the whole file system, therefore you need to sudo to not get errors with privileges.


----------



## Mac Osxtopus (Oct 11, 2002)

I looked at the headers, i couldn't find something even close to conio.h  , does ANYONE know how to clear the screen and make the keyboard 'hot' in mac C++?


----------



## Krevinek (Oct 11, 2002)

Well, to clear the screen, newline for about 24 lines or so. Define 'make the keyboard hot', and I could help you further.

You could also just check the unix documentation for console programming for the BSD equivalents. Since you are working with the console, you will not find everything in the standard libraries, and you will not be able to do every little thing you want without going into Unix/DOS specific code.


----------



## gumse (Oct 11, 2002)

system("clear");


----------



## Mac Osxtopus (Oct 11, 2002)

Well, I tried that in a simple program, the output is this(cout << "Without clear...etc.) : 

Without clear
tput: no terminal type specified and no TERM environmental variable.
With clear



The program was this:

#include iostream.h // the forum doesn't like alligators
#include stdio.h
#include stdlib.h // I just add them for good habit since i tend to use em

main()
{
 cout << "Without Clear\n";
 system("clear");
 cout << "With clear";
 return 0;
}


----------



## btoneill (Oct 11, 2002)

conio.h is a system with commands that only work for DOS. If you want something that does the same type of things, you want to look at the ncurses stuff. The fuctions won't be the same, and you'll have to read the manuals for the library to figure out what you are looking for, but in the unix world, curses/ncurses is what you want.

Brian


----------



## Da_iMac_Daddy (Oct 13, 2002)

My book for C++ in school uses proprietary #include files. They all start with lvp\ that stands for Lawrenceville Press they only exist on their installation of borland C++. So I just needed to find alternatives.


:: edit: I also thought that stdio.h had a function called clscr(); that would clear the output field but that may just be what i thought it might really be in some other header file ::


----------

