General C++ Programming - September 2013 (Page 4)

Problem with SFML text
 
Hi, my text for the score and difficulty doesn't seem to work. They are both appearing twice and not updating. The score text worked fine until I inserted the d...
[2 replies] Last: Thank you! That solved it. If anyone has any constructive criticism ... (by AceMice)
Simple Coordinate Plane
 
Hello, I'm creating a quick program to calculate midpoint and distance between two points. I'm having a little trouble and am wondering if anyone more experienc...
[12 replies] Last: The program does work. (by letscode)
Storing classes in array
 
I have a base class Building. Then come its children classes - Commercial Building and Residential Building. The third level is composed of Apartment and House ...
[5 replies] Last: I don't know if your solution will work. Yes it will. We know that ... (by andywestken)
some errors running the program
 
I'm doing a Lab assignment for my C++ class, but I'm stuck on some errors which I can't understand. I need someone expertise here. Below is my code. I supposes ...
[6 replies] Last: void setplayerName ( char new_playerName) { *playerName = new_playe... (by kulkarnisr)
Cast and parenthesis
 
Hello, Here is a little piece of code: int i = 5; double l = double(int(i)) / double(int(i)); This code does compile (with gcc 4.6.3). Let's add pare...
[3 replies] Last: I would have expected to get an error as the lhs of the / is a cast t... (by Catfish4)
Confusing assignment
 
void person :: print() { cout << ssn << " " << fname << " " << lname << " " << dob << "\n"; } person ** read () { string arraynam...
[2 replies] Last: It is probably this part: A = p; All your A 's are pointing to t... (by abhishekm71)
HOW TO SAVE A DATA TO FILE?
 
what are the codes that will save the data then it will appear in a file (.txt). I typed the name "SpongeBob SquarePants" Name: SpongeBob SquarePants ...
[5 replies] Last: Rigghttt. If you did look it up on the forums, you'd find a page on f... (by closed account N36fSL3A)
struct vs classes.
 
#include <iostream> struct st_one{ public: void set(int x){hello_struct = x;}; int get(){return hello_struct;}; st_one(){hello = 0;}; private: int hello...
[5 replies] Last: Basically, the convention of leaving only data members for "struct" is... (by thebeto1of)
C++ Get Mouse Position
 
What is the command to return the position of the mouse on screen in C? I've been searching around but can't find it.
[8 replies] Last: My result was a DLL for GM:S. The problem with GameMaker:Studio is tha... (by FatalSleep)
Segmentation fault
 
Hello people, I would greatly appreciate someones help on my program. I have to make a word scanner program and I have came to a stop because of this stupid se...
[3 replies] Last: > I have those cout statements to show where it stops Get a debugger,... (by ne555)
Giving audio-input to a C program
 
Hi, I want to give audio-input to a FFT code (KissFFT) written in C, on a real-time basis. While I can give a simple test signal (like sine wave) by writing ...
[3 replies] Last: Is this a homework assignment? If so, do you have more specific instr... (by htirwin)
Write an interactive text based menu interface (using a loop)
 
Write an interactive text based menu interface (using a loop) that will allow the user to Enter a task or assignment Display all of the tasks that are in th...
[1 reply] : This is some pretty basic stuff, and to be honest, having people do yo... (by roger911)
Where to put non class member functions? you guys?
 
If you are doing some big program, usually, how do you organize the files? Put the class and its member in head file, but where to declare non member functions ...
[4 replies] Last: Thanks! (by northfly)
by shaggy
c++, SDL RPG game
 
Hey there, I have really wanted to make an RPG in c++ for a while, but never thought i could do it. It could just be text-based, but I would prefer the game t...
[7 replies] Last: RPG are good for beginners yes, also you should consider making a very... (by Uk Marine)
freeing dynamic arrays from memory
 
So I'm trying to wrap my head around dynamic arrays, and I've finally figured out how to build one, using int arraysize = randomnumber; int* arrayname = new ...
[8 replies] Last: So I followed your advice, but I ran into something rather interesting... (by roger911)
by Beta4
Have the computer guess your number.
 
OK so I'm stuck on another problem. I'm trying to write a program that you guess a number in your head 1-100 and then the computer asks you if its lower than 5...
[5 replies] Last: Ok I figured another way to fix this.... anyone knows how I can delete... (by Beta4)
Using an array of pointers
 
Ok So I think I've completely confused myself now. I've created an Array of pointers to objects using: Person ** A = new person * ; When I intend to a...
[10 replies] Last: Hi there, You have created an array of pointers, but you have not cre... (by closed account o3hC5Di1)
C++ to HTML control
 
Hello All, I have lot of C++ API exposed in our project and I want to build an application that queries the database and shows some stuff to the user in ...
[1 reply] : Hi there, You may want to check out http://www.cppcms.com . That will... (by closed account o3hC5Di1)
by Neeru
functions in c++
 
Somewhere I came across a code like this class_name::function( [=] { function1(); function2(); function3(); ...
[3 replies] Last: EDIT: Book: http://www.amazon.com/Primer-5th-Edition-Stanley-Lippman/d... (by JLBorges)
September 2013 Pages: 123456... 36
  Archived months: [aug2013] [oct2013]

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