General C++ Programming - November 2012 (Page 3)

I'm missing something and struggling.
 
I've been at this for days and researched the web, read, and studied for a while. I have tried to work this out before posting and have to utilize inheritance ...
[3 replies] Last: Thank you, Kyle for your time this helps bring things to perspective a... (by draco0808)
Puzzling default move constructor
 
I am running gcc 4.7 on fedora 17 on 32-bit x86. Below, is source code that illustrates the puzzler: The compiler complains about a missing move constructor...
[2 replies] Last: Thanks. I'd heard about this, but have never been bit before, so I di... (by normvcr)
by sabi20
Pass a dynamically created struct to a function
 
How do u pass a dynamically created struct to a function by reference. I cant get this to work i keep getting error at the function call saying: " error: canno...
[3 replies] Last: oh thanks (by sabi20)
Using sentinel method to end the input sequence? Help!
 
SOLVED
[9 replies] Last: THANK YOU!!! (by ovaltine99)
by Hucaru
Continuous input
 
Hi, I am trying to make a calculator and was wondering if there was a way to evaluate input before submitting it? For example char = ch; while (cin >> ch) {...
[2 replies] Last: Cheers, thanks. (by Hucaru)
override standart allocator
 
I want to see how memory consumed by std::set, in particular how bytes are ordered for tree itself and data in that tree. So i just overrided allocator in next ...
[4 replies] Last: Now i see! Thanks! P.S. #define, really? Why not in tests? :)... (by icegood)
Please help me Tic Tac Toe pro
 
the my program can work result not correct. i think some wrong about displayBoard(gameBoard). please help me solve it. Thank you so much. THIS IS MY CODE #incl...
[no replies]
by sabi20
Dynamic array of structures
 
Dynamically create an array of Student structures as declared below to store the student data from the file. There are 10 students and each student has five gra...
[8 replies] Last: Yes, that's exactly right. studentInfo will give you the second st... (by MikeyBoy)
by lyla
Need Help & Review on my final project
 
This is my final project and below are my final code and the instructions. I am not sure if I covered everything correctly. The instructions aren't clear as t...
[4 replies] Last: Thank you everyone! I am new at this so I was a bit confused on the in... (by lyla)
by iky
need help with printing arrays?
 
hi. im having trouble printing arrays and spacing them out equally. i want them to look like this: array 1 array 2 array 3 4 2 ...
[4 replies] Last: If you know all the array names and values will be less than 8 chars l... (by SamuelAdams)
by noo1
error LNK2001: unresolved external symbol
 
This is the first error I'm getting. But I think I'm going to need a lot of help on this one. I feel pretty lost. Here's the beginning of my code. Then I'...
[5 replies] Last: omg, I totally missed your line 37. I even checked what you'd posted ... (by noo1)
Norm of a Matrix C++
 
Hey guys! I started to learn C + + on my own and I would like to ask for some help about an exercise that I got from a site and I couldn't find a solution. :...
[8 replies] Last: I guess so, but the problem is that is not working for matrixes with d... (by dudamonnerat)
Get integers from a file into an array
 
Hey guys so basically I have to read numbers from a file and put them in an array. there are 50 numbers in the file. I keep getting a weird number when I try to...
[2 replies] Last: Hey sorry about that I dont know how to post tags :( anyway thnx for t... (by linklink24)
How to make that typeid returns the type of object child
 
Hi! I have the class ' Component' with a std::string variable, 'name' that his value is typeid(this).name() , call from constructor. The problem is that ...
[3 replies] Last: But I need call this function from the constructor of Component. Th... (by cire)
Handling multiple exception
 
So is it possible/good practice to do something like: try { int numFrames = atoi(argv ); frame* frameArr = new frame ; } ...
[no replies]
istreambuf_iterator STL question
 
hi everybody . please help me freopen("in.txt", "r", stdin); deque<char> dq; copy(istreambuf_iterator<char>(cin), istreambuf_iterator<char>(), back_inserte...
[2 replies] Last: my dear i want use copy function !! i think i must define my char_trai... (by ahura24)
set::erase(iterator pos) complexity is amortized constant
 
Is it mean that if pos somewhere inside then it really takes constant but if position is first or last then it takes log(size) overtime to recalculate new first...
[3 replies] Last: The way I understand amortized constant is that the average time it ... (by icegood)
Fast Fourier Transform ( FFT )
 
Hello I am Ali from Iraq, I am a Master's student in Electrical Engineering / Electronics and Communications Department, I need to apply Fast Fourier Tr...
[1 reply] : http://www.fftw.org/ (by mik2718)
Trouble clearing cin or getline() buffer - !!!
 
I have the code below, searching an array for user entered 'city'. Then search and when found, return the city, tax rate, and county. I want to ask the user if...
[2 replies] Last: I think getline() should not need cin.clear() after it. However, cin >... (by Hucaru)
using pointers to find the mode
 
I have to write a program that will find the mode of a group of numbers. How should I tackle it using a pointer to find the number that appears most and produci...
[3 replies] Last: Yes, that looks much better! Thanks :) (by MikeyBoy)
November 2012 Pages: 12345... 51
  Archived months: [oct2012] [dec2012]

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