Fuction Headers

This is a discussion on Fuction Headers within the C++ Programming forums, part of the General Programming Boards category; getch() is provided from conio.h so therefor you have to include conio.h in your header like this. Code: #include <string> ...

  1. #31
    Registered User
    Join Date
    Feb 2002
    Posts
    591
    getch() is provided from conio.h so therefor you have to include conio.h in your header like this.

    Code:
    #include <string> 
    #include <iostream> 
    #include <fstream> 
    #include <conio.h>
    
    using namespace std; 
    //the rest of your program
    ALthough I want to point out that getch is a non portable C function and everything else in your code looks to be C++. It is a better practice to pick one languish and then stick to that. Replace getch with cin.getline(); or some other appropriate C++ method and your code will be more concistant.
    Last edited by Barjor; 06-12-2002 at 12:27 PM.

  2. #32
    Registered User
    Join Date
    Jun 2002
    Posts
    15
    it works!!! at last - thanks all! :-)

Page 3 of 3 FirstFirst 123
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 06-18-2005, 03:26 PM
  2. include question
    By Wanted420 in forum C++ Programming
    Replies: 8
    Last Post: 10-17-2003, 04:49 AM
  3. Headers that use each other
    By nickname_changed in forum C++ Programming
    Replies: 7
    Last Post: 10-03-2003, 05:25 AM
  4. Precompiled Headers, are they necessary?
    By XenoCodex Admin in forum C++ Programming
    Replies: 2
    Last Post: 06-23-2002, 03:09 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21