General C++ Programming - August 2013 (Page 25)

Simple Memory Question
 
Hi Folks, I was using the program below to help me understand some memory concepts. As far as I know the array created in the function below should be destroye...
[4 replies] Last: To put it simply, the stack is where small variables are put when you ... (by J4ke)
Console app, outfile results
 
I have created a game that functions correctly, however, for balancing and future changes, I would like to record results .txt document (its 1v1 btw). I already...
[1 reply] : Take a look at this: http://www.cplusplus.com/doc/tutorial/files/ (by J4ke)
error in array sorting using vectors in VC++6 while no error in VC++2012
 
I used this line code in VC++2012 to sort integrated row array called arrayCosts. This code work in this version but d not work at VC++6 version. vector< ve...
[1 reply] : VC++6, being released in 1998, has no C++11 support. (by cire)
Trouble with character array
 
So i need to decrypt a Caesar Cypher for my CS class from a text file that is encrypted. I have to find the most common letter within the file and find the dis...
[2 replies] Last: Thank you so much for your reply! so you say that i would read in the... (by BlackDahlia1147)
C++ HELP! Fixed Notation
 
For some reason, it will not display in fixed notation, it still displays in scientific notation. Also it will not display a precision of 2. #include <iostr...
[3 replies] Last: No worries. I forgot to mention the reference section at the top left... (by TheIdeasMan)
Finding multithread program error?
 
How do I find an error in a multithreading program (written in C)? I get an address, but when I put it into psp-addr2line, i get ?? ??:0 Anyone knows how to ...
[2 replies] Last: An address that (in a non-multithreading app) would be the memory addr... (by superfury)
openmp help
 
Hi could someone guide me on installing openmp for visual studio 2010 and using it. would the following work in executing the commands in parallel. fo...
[19 replies] Last: Just sent you a pm code too big to post here thanks (by asda333)
Undefined reference to class definition ??
 
Hi I have successfully built OGDF under directory undefined reference to /home/vijay13/Downloads/OGDF-snapshot/ I have following code in test.cpp under di...
[2 replies] Last: @ne555 thank you very much your advise helped really well. (by Vijay13)
c++ program + mathlab
 
Hello I want to know how to combine(?) merge(?) two programming languages If I want to use mathlab code on the c++ programming what should i do ? ...
[no replies]
How to draw objects by using OpenGL
 
Hi all, I have been working on an inventory menu system for some engine. I would like to draw every objects into the engine scene but first I have to write a co...
[no replies]
Three digit random number generator
 
Hello, Does anyone know how to produce a code that will satisfy the following constraints. I don't really know C++ - Produces a random three number posi...
[2 replies] Last: Well what jlborges had done using c++11 is quite better anyways but he... (by a k n)
Keep looping until user enters a blank line?
 
So I've run into the following problem. My goal is to create a loop that keeps taking user input over and over until the user doesn't enter anything into 'cin >...
[1 reply] : You need to use the getline() function that takes data from the std in... (by ajh32)
Use of classes vs simple functions
 
Hi guys, I'm new to object oriented programming and to gain some experience I am trying to write some programs. My bigger concern are good manners in writing...
[5 replies] Last: Thank you all for the replies. You understood my question perfectly ev... (by ridoluc)
by simons
warning converting to int from double
 
Hi, I am trying to write a Fraction class and getting the following warning when compiling my code : Fraction.cpp: In constructor 'Fraction::Fraction(doub...
[8 replies] Last: Are you aware that floating point types like float and double are just... (by Peter87)
My First Game Attempt - SFML Snake
 
I've finally finished my first real attempt at creating a game with SFML! I randomly decided to program Snake the other day and managed to finish it in a few ho...
[no replies]
WM_TIMER puzzle
 
I am setting up a time using SetTimer(,,,,). I then try to catch the timer message with WM_TIMER. I find that I can only catch the end of timer message when the...
[3 replies] Last: Thanks for answering my query you both. Andy, posting a script that ... (by paulsim)
by maxxjr
C++ refresher...question on new functions in derived classes
 
I am trying to quickly come back up to speed on some of the finer points of C++ after 10+ years away from it. I may get an answer faster here while I try to fi...
[6 replies] Last: [quote=EssGeEich]Make them comply with a single base one, so you can s... (by Disch)
by coder1
reading strings from a file with spaces
 
HI I need to write a program that reads a paragraph from a file (i dont know its length) and i need to read it with spaces i thought of using getline() fun...
[4 replies] Last: no im so sorry it is working there was a mistake by me. so sorry (by coder1)
Casting base-to-derived loses information
 
In a game I'm working on, I have an event system that looks like this: event.hpp [code firstline=10]namespace a_game { namespace engine { name...
[7 replies] Last: Why not just have the game state be your event handler and use inherit... (by Disch)
help with problem
 
I started programming and i need help with this problem i do not know what is wrong with it. /* If we list all the natural numbers below 10 that are mu...
[5 replies] Last: #include <iostream> using namespace std; int main(int argc, const c... (by ajh32)
August 2013 Pages: 1... 232425262728
  Archived months: [jul2013] [sep2013]

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