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

Question about a loan calculator
 
...
[3 replies] Last: Thank you everyone for all your help! I finally got it working. (by Mathguy217)
Problems with stringstream
 
Hi everybody. I am testing HTTP headers using sockets. I have created a class to control them and I believe that this part is OK, but I have an strange behav...
[1 reply] : 1) Use ostringstrem instead of stringstream : you do not read anyt... (by MiiNiPaa)
i need help in coding this please
 
I am totally new to this site as i am also a beginner in c++. I need help in coding this please. Write a C++ program that asks the user to enter as many word...
[1 reply] : Hi, i am also a beginner in c++ Could you move this to the beginne... (by TheIdeasMan)
How would I refactor this into overloading ++
 
Here is the code I am using to ++ bool Inventory::incrementItem(int checkSumName, int weight) { curr = head; while (curr != nullptr) { if (cur...
[1 reply] : Does the item not know its own weight? You seem to have that as an in... (by Disch)
UGH PROBLEMS!!!!
 
I cannot get this simulation right. Can any advanced users help me debug this? #include <GL/glut.h> #include <vector> #include <cmath> struct Particle { ...
[1 reply] : post this in code tags. It is easier to read. http://www.cplusplus.co... (by Bdanielz)
Whats the difrence Pointer and Refrence
 
So what is the difrence betwen. SomeStruct* StructOne; and SomeStruct & StructTwo; // Can not be null?
[5 replies] Last: So passing somthing by refrence &SomeObject is the same as just passi... (by helios)
Help with SFML Problem?
 
I got SFML to finally work with Qt Creator (I tried using it with Code::Blocks, didn't work) and I ran into a problem, again. Using the "Window" library, I cann...
[7 replies] Last: I just did. And I also noticed something. When I go to exit the progra... (by AceDawg45)
SDL_TEXTURE high memory usage
 
Hi Everyone, I'm programming a 2D Game usign SDL_2.0 and I'm having an issue with SDL_Texture. All my textures are loaded once in my Main.h and then my ot...
[1 reply] : Creating an object should not imply creating a texture. The actions of... (by helios)
by leo255
Need Some Help Understanding Stack Implementation of Linked Lists
 
Hi guys, Not sure if this should be in the beginner section. Perhaps it should be. I have this code that I need to memorize for my final. Memorizing code ...
[1 reply] : except why I'm setting ptr = p. I feel like p should be equal to NULL... (by helios)
Recognize wich circuit is closed
 
Hello, Me and my friend decided to start a project. We know few things about C++ but we need to know how or if it is possible for the language to recognize wic...
[no replies]
C++ Compiler for Chromebook
 
I have an Acer Chromebook and wondered if anyone has used any of the C++ compilers in the Google app store for the Chromebook or can recommend a Compiler that i...
[1 reply] : Hopefully this helps: http://superuser.com/questions/430418/compile-c-... (by CDuck)
by amaid
Meaning of Shape *p=new Circle();
 
Shape and Circle are classes.Shape is the base class and Circle is derived from Shape class.Can someone tell me the meaning of the following statement: Shape *p...
[3 replies] Last: "Object Slicing" refer to the case where you assign an object of a der... (by ne555)
Open World RPG - Loading System
 
Hello all, I am making an open world RPG game. I have already done the graphics rendering (with directx 11 on windows 8). I am a bit confused of how to load al...
[4 replies] Last: Ah good idea, thanks (by Irrelevant Elephant)
Priority Queue
 
I am trying to implement the following priority queue and having trouble defining the print_tree member function (found at the bottom of PriorityQueue.h) and fi...
[no replies]
Random Numbers Generator Question
 
So, there has got to be an easier way to generate random numbers within a specific range. Here is the code that I have been using, for a range of 1-6: #inclu...
[10 replies] Last: I just use C++11's RNGs instead of rand and let them do the distributi... (by Disch)
by chhe
speed question
 
I had written a program that writes to a comma delineated file and it takes forever to finish running. Below is a simplified version of the program that compile...
[6 replies] Last: First step, get rid of the vectors and directly write your strings in... (by Agent)
by Agent
General Computer Science question
 
On multiple occasions, I've found myself writing code that requires a constant loop with the condition in the middle of the code segment. while(true) { // d...
[9 replies] Last: Can you explain what this is or provide a reference. I couldn't find ... (by closed account z05DSL3A)
by antmjr
how to set stack size with GCC MinGW
 
Hi all. I'm following a course with coursera (algorithm 1) and my program for the assignment crashes inexorably (many are experimenting the same thing there, th...
[5 replies] Last: well, just a little update for those who may need the same piece of in... (by antmjr)
by BasV
Passing by value vs passing by reference
 
Hi everyone, When I create class members or constructor such as this: AreaExit(const Vector3& position, const Direction& direction, const std::string& ...
[5 replies] Last: Thanks a lot for the replies! (by BasV)
How does std::random_device generate "true" random numbers
 
I just read on this website that the function std::random_device() is not like other 'generators' that generate pseudo-random numbers. It generates true stoc...
[5 replies] Last: Aah, ok.. So the function random_device first tries to 'delegate' the... (by abhishekm71)
June 2014 Pages: 1... 1516171819... 21
  Archived months: [may2014] [jul2014]

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