Click here to Skip to main content
15,905,322 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Parallel port in C++ Pin
John M. Drescher17-Feb-04 7:17
John M. Drescher17-Feb-04 7:17 
GeneralRe: Parallel port in C++ Pin
Roger Wright17-Feb-04 8:46
professionalRoger Wright17-Feb-04 8:46 
GeneralRe: Parallel port in C++ Pin
jhorstkamp17-Feb-04 6:35
jhorstkamp17-Feb-04 6:35 
GeneralRe: Parallel port in C++ Pin
John M. Drescher17-Feb-04 7:08
John M. Drescher17-Feb-04 7:08 
GeneralRe: Parallel port in C++ Pin
jhorstkamp17-Feb-04 7:58
jhorstkamp17-Feb-04 7:58 
Generalreading without mfc Pin
ns17-Feb-04 2:58
ns17-Feb-04 2:58 
GeneralRe: reading without mfc Pin
RChin17-Feb-04 3:10
RChin17-Feb-04 3:10 
GeneralRe: reading without mfc Pin
Henrik Stuart17-Feb-04 3:20
Henrik Stuart17-Feb-04 3:20 
Hey,

This is how you can do it in C++:
#include <fstream>
#include <vector>

int main() {
  std::ifstream fin("test.txt");
  fin >> std::skipws;

  std::vector<int> test;
  int j;

  while (fin >> j)
    test.push_back(j);

  return 0;
}


Hope that helps you.

--
Henrik Stuart (http://www.unprompted.com/hstuart/)
GeneralRe: reading without mfc Pin
John M. Drescher17-Feb-04 8:10
John M. Drescher17-Feb-04 8:10 
GeneralRe: reading without mfc Pin
Anonymous17-Feb-04 3:23
Anonymous17-Feb-04 3:23 
Generalthank you everyone! Pin
ns17-Feb-04 3:29
ns17-Feb-04 3:29 
GeneralRe: thank you everyone! Pin
Ravi Bhavnani17-Feb-04 17:17
professionalRavi Bhavnani17-Feb-04 17:17 
GeneralRe: thank you everyone! Pin
ns18-Feb-04 7:18
ns18-Feb-04 7:18 
GeneralRe: thank you everyone! Pin
Ravi Bhavnani18-Feb-04 7:26
professionalRavi Bhavnani18-Feb-04 7:26 
QuestionHow much memory? Pin
mcgahanfl17-Feb-04 2:57
mcgahanfl17-Feb-04 2:57 
AnswerRe: How much memory? Pin
Hesham Amin17-Feb-04 3:28
Hesham Amin17-Feb-04 3:28 
AnswerRe: How much memory? Pin
David Crow17-Feb-04 3:43
David Crow17-Feb-04 3:43 
GeneralRe: How much memory? Pin
mcgahanfl19-Feb-04 10:15
mcgahanfl19-Feb-04 10:15 
GeneralCWnd::OnVScroll() Pin
фил17-Feb-04 1:51
фил17-Feb-04 1:51 
GeneralRe: CWnd::OnVScroll() Pin
basementman17-Feb-04 6:04
basementman17-Feb-04 6:04 
GeneralKernel(What compiler?) Pin
Alexander M.,17-Feb-04 1:44
Alexander M.,17-Feb-04 1:44 
GeneralRe: Kernel(What compiler?) Pin
Prakash Nadar17-Feb-04 2:52
Prakash Nadar17-Feb-04 2:52 
GeneralRe: Kernel(What compiler?) Pin
Alexander M.,17-Feb-04 9:45
Alexander M.,17-Feb-04 9:45 
Generali want to get the handle of a clicked window among various opened windows Pin
Amr Abdel-Mohsen17-Feb-04 1:11
Amr Abdel-Mohsen17-Feb-04 1:11 
GeneralRe: i want to get the handle of a clicked window among various opened windows Pin
Prakash Nadar17-Feb-04 3:03
Prakash Nadar17-Feb-04 3:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.