Thread: Binary to Dec Source Code

  1. #16
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Code:
    getline( infile, data, 80 );
    [edit]Dang, beaten
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  2. #17
    Registered User subdene's Avatar
    Join Date
    Jan 2002
    Posts
    367
    Here is a very quick example, going bed now as i've got to be up at 5 am. :-(

    Code:
    #include <fstream.h>
    
    #define BUFF_LEN 80
    
    int main(void)
    {
      char Data[BUFF_LEN];
      ifstream InFile;
    
      InFile.open("Test.txt");
    
      InFile.getline(Data, BUFF_LEN);
      InFile.close();
    
      cout << Data;
    
      getchar();
    
      return 0;
    }
    Be a leader and not a follower.

  3. #18
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Don't use old-style headers. Use <fstream> and using namespace std;.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. S-Extract, Self Extractor w/ Source Code
    By CrazyNorman in forum C++ Programming
    Replies: 3
    Last Post: 09-03-2006, 11:50 AM
  2. Source code....
    By Darkcoder in forum Game Programming
    Replies: 8
    Last Post: 03-07-2005, 08:58 PM
  3. how do you code in binary...
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 13
    Last Post: 01-27-2003, 05:14 PM
  4. where can I find source code for a binary tree?
    By binary_man in forum C++ Programming
    Replies: 5
    Last Post: 01-10-2003, 09:53 AM
  5. Source Code Beautifier
    By Hammer in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 05-05-2002, 09:21 PM