General C++ Programming - April 2009

by yygyt
Updating a File
 
Hello, I was trying to update the data in a file for a dbms. Anyway, at some point, I had to chan...
[1 reply] : Read the file to memory, modify, write back. If the files are too big... (by helios)
Overload operator << for a template-nested private class
 
I get this error: error C2785: 'std::ostream &operator <<(std::ostream &,const Outsider<T>::Ne...
[4 replies] Last: Just move the implementations of the operator<< into the class at the ... (by jsmith)
NO File, but still a buffer... how?
 
OK, my challenge is basically this - read a file from a SCSI device through the device manufacturers...
[1 reply] : http://www.cplusplus.com/reference/iostream/istream/read/ Also, you... (by helios)
calling member functions on a boost::lambda pointer
 
Hi! I am trying to use lambda to this use: std::for_each( paBOBhErfolgAbgrenzung->begin(), paB...
[1 reply] : boost::bind( &YourObjectType::coutData, _1 ) will do the trick. ... (by jsmith)
Bin file io
 
so im working on this little file io project of mine and i made this: #include <iostream> #inc...
[11 replies] Last: An array declared as array has 9 elements: [0..8]. (by helios)
Can't call OpenThread
 
Although i included windows.h in my project, i can call to OpenThread API. It said 'undeclared ident...
[1 reply] : msdn says this: Minimum supported client Windows 2000 Professional ... (by writetonsharma)
by Incan
fstream, two dimensional arrays and spaces
 
Hello, I'm trying to get fstream to send words seperated by spaces (or tabs) into a two dimensional ...
[1 reply] : int main() { char chaine ; ifstream entree("dico.txt"); int i=0... (by writetonsharma)
Templates
 
Is it possible to put a class/function template definition in a header file and then include the fil...
[3 replies] Last: OK, thanks :) (by Tom Backton)
Const functions and "using" classes
 
I have two unrelated questions: 1. Where do I put the const, in the declaration int MemberFunc(...
[8 replies] Last: You didn't answer the question about const (the answer is: both, decla... (by Tom Backton)
by wretch
almost identical derived class function signatures
 
This problem has come up for me in slightly more complicated form, I have created a contrived exampl...
[4 replies] Last: -- but once you have a good design, the programming part is soooooo e... (by wretch)
File I/O problems?
 
Hi, I'm trying to make a program to create, edit and delete text using a .txt format and the users d...
[2 replies] Last: http://www.cplusplus.com/reference/clibrary/cstdio/remove/ (by Duthomhas)
Dynamic Stack Template
 
I have the following at this point: DynStack.h // Specification file for the DynIntStack clas...
[2 replies] Last: That did the trick. Thanks (by Return 0)
array compress
 
i need to do something like dirs in the pc. like C:\System\etc. using arrays or something else. ...
[4 replies] Last: Really thanks! (by chibolete)
by lotios
Passing a user supplied variable to a function
 
It is my first time posting here, so please bear with me. I have been trying to make a simple text-e...
[12 replies] Last: It still doesn't do what I want. Oh well, of to classes. (by lotios)
by vRltwE
Define a 3 dimensions vector
 
Hi, to create a matrix I do; vector<vector<double> > matrix( cols , vector<double>( lines )...
[1 reply] : vector<vector<double> /* missing '>' here*/( lines )) But I'm not s... (by helios)
All confused.
 
Ok , i just installed Visual Studio 2008. As i followed through some tutorials on how to write a co...
[8 replies] Last: Hey! Kbw , well , thanks for the prompt reply. But since many days i w... (by noobers)
singleton pattern basics, private static data member definition
 
This simple code should compile and link according to the gang-of-four and websites: class X { ...
[2 replies] Last: Starting a new project and having the Console program setting helped. ... (by strawberry)
randomizing
 
i have this code where i have to sort a random array into different sorts. the code being: #inc...
[3 replies] Last: I'd have the functions take a pointer to the array. It's a bit easier ... (by closed account S6k9GNh0)
Threading error/questions
 
I'm trying to multi-thread a program i'm writing so it can accept user input while running a timer (...
[16 replies] Last: I tried Sleep(DWORD) and i get an error: expecting parameter before ) ... (by aeronet)
console syntax
 
i have this code with me and i just typed it down in normal c++ syntax, well most of it.. and i want...
[9 replies] Last: im sorry everyone.. didn't mean to sound as rude as i did...the work-l... (by hugsnbugs)
April 2009 Pages: 123... 20
  Archived months: [mar2009] [may2009]

This is an archived page. To post a new message, go to the current page.