General C++ Programming - April 2010 (Page 9)

reading data from multiple text files
 
Hi, I'm trying to write a program that reads one line of data from three different files each time it goes through the loop. Here's some of my code. //open t...
[no replies]
by Ponti
Casting member function pointers from derived class to virtual base class
 
Hello everyone, I have no clue why the following does not work! class Base { }; class A : public virtual Base { public: void Functio...
[6 replies] Last: What I explained is the general reason why member function pointers ha... (by jsmith)
by TaAaTi
problem with reverse
 
hi I have this qustion about writing a program this is it writ the program that work to strip pff the digits one at a time from the integer that enter by ...
[1 reply] : Hint: 123 % 10 = 3 ( % is the modulo operator, it returns the remain... (by Bazzy)
getline command and grade function
 
First, I cannot figure out how to use getline to read data such as the following past the first name and last name. I can get the first name and last name to pr...
[4 replies] Last: For your struct, insert a variable named char letter; (for example, ... (by Albatross)
determining the current position of the cursor
 
Is there any possible way to determine the current position of the cursor on the console output screen? I'm doing a text-based project, and this is a very criti...
[2 replies] Last: mythios 's code gets the current mouse coordinates. Is that what yo... (by Duthomhas)
by pkarun
ListView Control Text Color
 
How do i add Text color for List View control's row Text..? different colors for different rows based on the row data....? Thanks in advance
[no replies]
Disk based container?
 
We are in the process of re-writing an old utility that was written in house. It's win32 console program so it has a file size limit smaller than we currently n...
[5 replies] Last: Agreed. (by Duthomhas)
Unaligned access
 
I am working on a project and am getting some unaligned addresses generated. As far as I knew, gcc/g++ automatically generated aligned addresses. So, what could...
[5 replies] Last: It ought to be a compiler setting, but I can't find it on the Microsof... (by kbw)
consumer & producer threading model
 
Hi, Here is a common scenario I often face and would like to know your suggestion for the best approach. It is a very simple consumer and producer patten...
[4 replies] Last: Hi, another approach: Take a classical semaphore, which has a count... (by TheBear)
Problem with Private Variables in Class
 
I'm having trouble with private variables in a class. I was able to solve my problem by making those variables public, however this is not what is desired. Can...
[10 replies] Last: That is a very good question. It's just habit. My teacher told us to d... (by drummin2somebeats)
G++ or Intel C++ Compiler?
 
I want to do some mySQL/C++/MPI parallel programming. Which compiler should I stick with? Any information is appreciated, thanks!
[12 replies] Last: Ever heard of reverse engineering? More importantly, if your compil... (by helios)
function prototypes
 
I have a few questions about the following program. I can't seem to read all the data from the input file. It only reads the first student name, number, and gra...
[2 replies] Last: I did use getline() in line 59. I'm not sure where you got fin >> st... (by jonesin4anime)
Using different user-defined functions?
 
Hello all, I just started c++ this semester and I'm totally lost now. I did okay in the class up until now but this assignment totally has me confused, I'm not...
[1 reply] : What kind of problems are you having? If you don't know how to writ... (by Albatross)
Happy Numbers
 
Does anyone know how to write a program to find a happy number? I tried writing one, but it is apparently beyond me, because I cannot find a way through the pro...
[1 reply] : Hi Cadence, first: put the code, which computes sum of the squares ... (by TheBear)
by waxth
some basic problems with C++
 
Hi..a student studying c++, exactly just attending c++ courses for some unavoidable cases..I hadn't even learned about c. . could anybody help with the answe...
[8 replies] Last: waxth like the guys said give it a try first okay , i am too a stu... (by zinogg)
by Quik
BMP Files in c
 
Hey,could anyone help me out in converting a image to its negative i.e. create a negative image of the input bitmap file (in c) i`m new to image processing..su...
[2 replies] Last: firstly, i didn`t realize i was posting it on lounge.. secondly, i wa... (by Quik)
by ghym
I'm working on a text based game and my code won't compile
 
I'm working on a text based game and my code won't compile. It tries but never finishes. It just goes back and forth between control.h and setup.cpp there ...
[3 replies] Last: ghym I think your problem is with the header files,when ever you c... (by zinogg)
by fafner
string erase problem
 
I have a function that takes a string input and converts it to uppercase and removes excess spaces. This is the code: string parseInput(string in) { string...
[4 replies] Last: Ah, thanks;) (by fafner)
handling dynamic array
 
Hello, I have the following problem.I try to implement a template similar to the STL's vector template(I could use the STL,but at the moment I would like to ...
[4 replies] Last: That's what std::vector needs. You won't find a more optimal solution... (by jsmith)
by waxth
True and False problems
 
TRUE/FALSE 1. You can initialize a pointer variable by applying the operator * to an existing variable of an appropriate type. 2. By using cin.get(), you...
[7 replies] Last: For future reference: If you find reading explanations too hard, how a... (by hanst99)
April 2010 Pages: 1... 7891011... 24
  Archived months: [mar2010] [may2010]

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