General C++ Programming - March 2016 (Page 21)

what's wrong with this function?
 
In the following code how do I pass card_objects array through function read_back(card_objects) for use by for (auto elem:card_objects)? I've isolated the error...
[11 replies] Last: awesome thx t (by technologist)
Class to store and convert complex numbers
 
Struggling to create a class to store and convert complex numbers... i am getting an error which says member function already defined or declared, and i am uns...
[1 reply] : Line 19, 26: You have identical constructors. PLEASE USE CODE TAGS (... (by AbstractionAnon)
problem using std::forward
 
Hi, I have these overloaded functions which signature is: // VERSION 1 template<typename Control, typename...Args> auto addWidget( unsigned height, const Args...
[1 reply] : I just want to perfect-forward the variable number of arguments recei... (by Cubbi)
Code dependent on template argument?
 
Hi, I have a template function and I want it to do something only when its template argument is say == class Date. How can I accomplish that? Sample: t...
[2 replies] Last: great!! thanks!!! (by JUAN DENT)
Sound input and output
 
How to input and output sound using c++? Like recording sound then play the sound. I want to make a sound recorder.
[1 reply] : Have a look here: https://msdn.microsoft.com/en-us/library/windows/de... (by Thomas1965)
by Xriuk
Visual C++ complains about ambiguous overload
 
I have some classes, each of them has a static method which I use to create them (I wan't my classes to be created only with new, don't ask why): // Base class...
[5 replies] Last: @naraku9333 Thanks, This worked! If I undestood correctly what happene... (by Xriuk)
How to read a list of num and then adding the even number??
 
I am new to c++ and find a lots of difficulties on learning it. How to read a list of number input by user? Do i need to cin >>x , y ,z ....e.t.c? And how to ...
[1 reply] : cin >> x >> y >> z >> etc would do, but you'd have to do exactly ... (by Moschops)
Loop if Invalid input
 
Hi, Im a beginner with c++, I would like to ask for help with my loop thingy i dont know where to put the loop but the program should be like this CONVERSION ...
[no replies]
by Gyiove
calculating avarage and not letting sum/count to go too high
 
Hello everyone. Here's a classic way how I would calculate the avarage double sum = 0.0; double count = 0.0; double calculate( double value ) { sum +=...
[9 replies] Last: To estimate the error in computing the average as a moving average: ... (by JLBorges)
JPIP Streaming Images(with download images client end)byte by byte save single same file of bitmap file folder c++
 
JPIP streaming images(with download).How to save the bitmap in c++ local folder. Kakadu)JPEG 2000 Interactive Protocol is protocol using this i streaming the...
[no replies]
Help! Inheritance-BankAccount/CheckingAccount Assignment
 
Hi, I was having problems with the following school assignment: "Define the class bankAccount to store a bank customer’s account number and balance. Suppos...
[no replies]
by ec252
Why isn't my code working the way I want it to?
 
I am having a problem with my code. I have to create a snake game and just right now(at the moment) I only need help printing ONE asterick'*' onto my 2d array t...
[1 reply] : //Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23026 for x86... (by JLBorges)
Scrabble scoring using arrays
 
I have to make a scrabble scoring game using 2 arrays. The first array holds the user inputted word and the second array holds the value of each letter. Lastly ...
[no replies]
Do goto blocks execute even if there is no goto?
 
Like this: for (...) { if (...) { //do things goto h; } } h: //do more things Is the h block going to execute even if the goto in th...
[10 replies] Last: > Should breaks and continues be avoided? break , continue and go... (by JLBorges)
by terk11
C++ How do I include these functions into my main function and prototypes. Also how do I set the parameters
 
Here is my code, it is for the game Farkle. I need help integrating the functions and setting their parameters. #include <iostream> #include <string> #includ...
[no replies]
Infinite loop
 
I'm running this infinite loop until a user enters zero and then I have to write the program so it will output how many even and odd integers the user inputted ...
[1 reply] : You need to accumulate statistics about the input. Store information i... (by keskiverto)
by gradku
C++ reading in from text file for comparisons
 
Hi, so I'm very confused on how reading in from a text file works. If I wanted to read in from a text file that contained information delimited by colons and en...
[3 replies] Last: Hey, thank you guys for your inputs. I've been stuck on this problem f... (by gradku)
by Xriuk
How does preprocessor replacement works?
 
I have defined this macro: #define draw_rect(x, y, w) r = {x, y, w, 1};SDL_RenderFillRect(window->getRenderer(), &r);std::cout<<(x+w)<<" "<<y<<"\n" And I use ...
[3 replies] Last: 1. A function-like macro should behave like a function so you should w... (by aphillips801)
Questions about vectors.
 
I've been using vectors for a quite a while and have got pretty decent with them. However out of all the STL containers I don't really know how they work exactl...
[7 replies] Last: Thanks everyone for the information! Definitely helped give me more in... (by rabster)
by toch
vector problem
 
Hi everybody, I want someone explain me what is wrong is this code because it's won't execute, throwing the following message during execution: main.exe has sto...
[2 replies] Last: Thanks a lot keskiverto, your help solve my problem, thanks again, I f... (by toch)
March 2016 Pages: 1... 1920212223
  Archived months: [feb2016] [apr2016]

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