General C++ Programming - June 2014 (Page 6)

Any mobile/cellphone app
 
I visit this site through my phone often but it is not that practical at times like when I accidently rotate the screen or trying to expand the screen to a read...
[1 reply] : I have already thought about that, but I'm not a Objective-C/Java-C++ ... (by iQChange)
by truste
No match for 'operator[]
 
I have an assignment to create a grading system using multimap. It's not completed yet at the moment but whenever i try to compile it tells me "no match for 'op...
[3 replies] Last: Try and imagine what would happen, when there are several elements sha... (by tipaye)
Code Structure For Menu/UI
 
Hi guys. Just wondering if someone can advise on how to structure something like Game Menu. I was googling and did not find anything useful. I am coding a li...
[2 replies] Last: I have basic state machine like this: #include "RT_Renderer.h" #inc... (by rebel Code)
text wont draw
 
i am trying to draw a text using sdl ttf, but it won't work //============================================================================== #include "CAp...
[no replies]
by ntran
Exact arithmetic in c++
 
Hi everyone, What does the term "exact arithmetic" imply in computational science? And how do I achieve it in C++? Thanks.
[1 reply] : http://lmgtfy.com/?q=What+does+the+term+%22exact+arithmetic%22+imply (by SamuelAdams)
Specializing a method of a template class
 
Hi everybody, I'm trying to write a templetized (templated?) container class that can be sorted. No, STL doesn't work in this case for several reasons that I...
[4 replies] Last: It just has to return a bool representing a (partial) order between t... (by MiiNiPaa)
Problems with for loop and strings
 
Hi everybody. I am testing HTTP Headers and I have an strange problem. When I get the response of the server, it is the correct one the first time. If I use a f...
[3 replies] Last: You have a problem with your code. char *TCPSocket::Read() { ... (by kbw)
by fafner
Going from struct to class
 
I've been working on a path-tracer for some time, and all along I've used structs instead of classes for vectors and matrices. Today I changed all of them to cl...
[5 replies] Last: ne555: I had done a bit of that already, but not enough. I wrote a few... (by fafner)
by abbash
Inheritance issue
 
I have the following code: #include <iostream> class A { public: virtual void f(int n) { std::cout << n << 1; } virtual ~A() { } vo...
[8 replies] Last: The last two comments are exactly what I wanted to know and wasn't 100... (by abbash)
by DouDou
Algorithm for permutations of operands and operators (1,2)
 
Hello, I have been scratching my head over this for a while, but I can't seem to figure out the algorithm to find the right permutation(s) of operands and op...
[24 replies] Last: Well, I may as well. http://pastebin.com/1JYATZCX (by helios)
What is wrong with my code when i press ctrl + z?
 
//TaylorZ Merchandis: TaylorZ Merchandise.cpp //This program is designed to calculate the sales for TaylorZ Merchandise #include <iostream> #include <iomanip...
[1 reply] : char codes; //... codes!=EOF In C++, this macro corresponds to the ... (by MiiNiPaa)
Errors in my program
 
it will not run and im not sure why. I have a couple of errors, but I'm not sure why. Here is my code. //Reads input from user to determine different d...
[1 reply] : need to make those else's else-if's (by Little Bobby Tables)
Returning a pointer to an encapsulated data member
 
So, I've got this class in SDL Player that has, among other things, an SDL_Texture* to hold an image that represents the player on the screen. I'd assume it's...
[1 reply] : Normally its OK if you just make it const-correct, then they can't mod... (by TwilightSpectre)
Can C++ have "dynamic languages stuff"?
 
I haven't said dynamic variables because almost all people would think in int* a = new int; . I mean dynamic variables, like in Python: a = 10 a = "im a stri...
[4 replies] Last: @Caligulaminus you got the right answer. Thanks :) (by iQChange)
Recursive Division Maze Algorithm
 
Starting work on a procedural generated maze (which I might make into a dungeon type thing as some point, as you can specify the room size with this algorithm)....
[no replies]
by edoz90
Strange SIGSEV on Genetic Algorithm
 
Hi all!! I made this program in C++ that should, by a genetic algorithm, build a word identical to the initial one improving itself recursively. The code is...
[5 replies] Last: Thanks for the reply and the patience! :) I know that my algorithm is... (by edoz90)
If I compile on Mavericks will it work on ALL Macs
 
TITLE. Asks it all.
[1 reply] : Maybe yes, and maybe on Linux (both Mac and Linux programs depends on ... (by iQChange)
by poteto
SDL wont render on a computer.
 
So when I start my program on my desktop, and many other computers, it would normally work, but when I try it on this laptop I use now, nothing is in the window...
[4 replies] Last: Can you quickly tell me which renderer falls back into what, because t... (by poteto)
problem with comparing two strings
 
Hi,I have trouble comparing two strings with strcmp. The bold part of the code are the parts that are not working and i hope somebody can explain to me what i d...
[2 replies] Last: Thank you ne555 for you answer which helped me a lot and of course tha... (by sabatiel)
by sjabat
Gas law C++ please helppppp asap
 
please check what is wrong help please please i need do and while in the program if the user inputs negative the output will be invalid #include <iostream> #in...
[13 replies] Last: please correct all the mistakes ive done. i have to make flowchart for... (by sjabat)
June 2014 Pages: 1... 45678... 21
  Archived months: [may2014] [jul2014]

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