General C++ Programming - March 2015 (Page 19)

Not sure what I'm doing wrong (Random Number Generator)
 
First let me say thanks for this forum. I'm taking my first C++ class (an online class, mind you) and being able to find topics on here has been big help. I'...
[2 replies] Last: Thanks! That helped. Unfortunately, I don't have a choice of what comm... (by Satchmo10th)
Its not working correctly believe problem is in the main function
 
#include <iostream> #include <fstream> #include <iostream> #include <fstream> #include <vector> #include <iterator> //googled these systems from here on do...
[10 replies] Last: ¿you are trying to read from an empty file? // input safety nets... (by ne555)
Project Ideas for C++ File Handling
 
I know there isn't much you can do with basic File Handling in C++. I've worked on some small projects like banking, (Shopping) Employers & Product data Managem...
[5 replies] Last: Google is best friend... (by jasonwynn10)
by oseri
What to exercise on ?
 
Hi, I'm looking for ideas of things that I could program in order to enhance my c++ skills. I've already written double linked list and a singleton and I mus...
[2 replies] Last: he said to enhance his C++ skills. I recommend Helping others and ... (by jasonwynn10)
\n interpretation
 
How can I interpret \n literally, I mean as a string o word instead of making c++ putting a New line. I am making a gnuplot script from a c++ code and I need to...
[1 reply] : Escape the slash, as in string s = "test\\ntest"; (by naraku9333)
Node list
 
Can any body explain to me easily why head = current changed to current = head on the second part? nodeType *head = NULL; // 1 nodeType *current; ...
[2 replies] Last: Thank you so much Disch!! That was very understandable. (by programmercarlito)
my inheritance class don't work
 
#include <iostream> #include "C:\Users\Isaac Dixon\Documents\School\Oak Wood University\c++ data structchers\class HW\theAdress.h" using namespace std; class ...
[10 replies] Last: yes they have the same idea but they still had some different problems... (by isaacthebro)
HELP TO PROGRAM
 
Can someone help me to program two searching and two sorting in one program using number. like for example linear 1,2,3,4 & 5 i need help
[1 reply] : Please, do not double-post. You already have a thread on this: http://... (by keskiverto)
C++ stock help
 
Hey guys, I'm new to C++ and I was told to do a project to maintain my scholarship in school for another year. They're dumped this on me and I was watching 'B...
[7 replies] Last: Thanks guys, I got it working anyway :) (by ITThing)
by WAKS
Player movement feels laggy (SDL)
 
I'm trying to make a simple 2D rpg game, and I have some problems. I have created a player sprite that I could move around the screen. But the sprite movement f...
[1 reply] : Creating textures are slow. You should create the texture and then reu... (by Peter87)
by yj1214
How do I link header files if i'm using text editor?
 
So I got to say this. I HATE IDE. It makes me even more harder to understand how C++ works. So the way I learn C++ is to use text editor and compile it using co...
[3 replies] Last: Thanks for the answer. And I know that i'm crazy not using IDE...but I... (by yj1214)
Array Function
 
I am confused about writing the two error conditions. Your function needs to ask the user the number of digits in the number, and then inputs the actual dig...
[1 reply] : An easy way to validate input is to follow this pattern: while (true)... (by dhayden)
Deleting Allocated Memory
 
Hello, I allocated an array of strings as follows. char *pTokenList = {"Customer Purchase Order", "End User Purchase Order Number", "Delivery", "Carrier ...
[1 reply] : Only delete things allocated with new Only delete things allocated w... (by Disch)
Am I doing this wrong? (working with massive data files)
 
Hello, I am currently creating an application in Qt Creator that will plot data and perform some manipulations/searches on the data. As stated in the title, ...
[4 replies] Last: As JLBorges pointed out, the best thing is to read the data into a vec... (by dhayden)
Function definition
 
Write a function that returns an integer and takes three character array parameters: left, right, and total. Left and right must be initialized by your phase 2 ...
[3 replies] Last: I also have to write these error conditions. Would these go after my d... (by momalle)
How can I fix the int main part for this program to run properly?
 
#include <iostream> void print(int a , int n){ for (int i = 0; i < n; i++) std::cout << a << " "; std::cout << "\n"; } void bubbleSort(int x , int n)...
[2 replies] Last: If you want to sort you should probably call your bubbleSort function.... (by naraku9333)
by xystus
Dlib c++ machine learning?
 
Where should I start? Tutorials, books? Thanks.
[1 reply] : the most important thing is to be very fluent in discrete mathematics. (by ToLesto)
by WAKS
Tilemap is eating a lot of memory (SDL)
 
Hello! I'm making a 2D game and right now I have created a tilemap that is being loaded from a text file and afterwards rendered to the screen. The problem is ...
[2 replies] Last: @Peter87 Thanks, it fixed the memory leak problem, but I have still s... (by WAKS)
c++ beginner problem
 
Hi, I am c++ beginner and i need some help with a problem. Made a Rational class who allows you to work with rational numbers. Class Construct will have tw...
[3 replies] Last: Thank you dhayden. I know MikeBoy, you right, just i forgot. Thank yo... (by LadyInRed)
SegFault caused by strtol
 
I'm using the following code segment: <void decode_inst(char instruction ) { int i =0; if(instruction == 'r'){ current_instruction.type = "READ"; ...
[4 replies] Last: If your file contains anything other than lines formatted as "xyz 12... (by Duthomhas)
March 2015 Pages: 1... 1718192021... 28
  Archived months: [feb2015] [apr2015]

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