General C++ Programming - April 2012 (Page 18)

calculate Final Letter Grades a class
 
hello there. i need to do a program that calculate the final grade of a list of students that is in a datafile.txt i have 4 datafiles in for of a list 1 student...
[5 replies] Last: You could open the files in main() and pass them as references to getD... (by vin)
by Yousra
Problem: Text Concordance using BST
 
Hey GUYS, I have this assignment and it is due tomorrow night and I really need your help because I can't get my program to work, so please help me find what is...
[2 replies] Last: MY Program // File: BSTappl.cpp // Test class template binaryTree... (by Yousra)
would this reset?
 
okay i have a sprite that moves on my some dimensions that i set with a random function to make it stop in random places...now it sometimes goes off the screen ...
[2 replies] Last: it will get a new value if that's what you mean. yea thats what... (by programmeraie125)
Help with "iterating" through queue
 
How could I "iterate" through a queue without altering its contents? I want to basically copy one queue onto another but I don't want to use .pop() because it'l...
[3 replies] Last: If you feel like iterating through a queue it's likely the wrong conta... (by coder777)
i believe it works just cant see it doing..
 
okay trying to make a count down time for my game and this is what i have so far for the clock clock_t previousTime = clock(); { DrawString("Time: ",4...
[3 replies] Last: CLOCKS_PER_SEC presumably 1000, and DrawString is going to take less t... (by rollie)
QT making slots manually?
 
how can i make stuff happen when i click a button in the codes, not using the qt creator thing? like in an empty qt gui aplication. what i mean is like: ...
[1 reply] : Use connect: http://qt-project.org/doc/qt-5.0/signalsandslots.html (by coder777)
How to delete memory used in constructor
 
So I have a constructor with the following statement: queue<T> *newQueue = new queue<T>; How can I deallocate this memory in the constructor? ...
[3 replies] Last: Or, if it really must be a pointer to a queue, you could use a smart p... (by rollie)
Something is wrong with my rands's?
 
#include <iostream> #include <cstdlib> using namespace std; class Dice{ //Constructor public: Dice(); ...
[2 replies] Last: Only call srand once at the start of your program before generating an... (by Peter87)
x86 to x64 UINT_MAX and/or INT_MAX issue
 
I am working with code that was largely written written by someone else. One of the functions adds poisson noise to an image. Basically, it takes the image (...
[8 replies] Last: To get rid of that warning you can use a cast static std::mt19937 rng... (by Peter87)
converting numbers to letters
 
hello im trying to do a program that converts numbers to letter for example if the number is betwen 90 to 100 the letter would be 'A' if its 80 to 89 the lette...
[5 replies] Last: got it thanks (by j0semigue1)
Recommended networking for text-based RPG
 
I'm considering putting together an online multiplayer (not massive multiplayer) text-based RPG for me and a few friends. I've made a text-based RPG before, but...
[1 reply] : I would suggest first doing just the last part of your idea. Create a... (by clanmjc)
Im having problems with classes?
 
Im trying to make a board game where it will keep track of where a person is on a board each time they roll. I can't get it to add up each roll of the dice. ...
[2 replies] Last: error: cannot call member function ‘void Dice::setRolls(double)’ ... (by Vlykarye)
Double-spacing file output in C++ Program?
 
The user enters in an input file, which is supposed to be filtered by various subclasses which I have implemented but have nothing to do with this question. The...
[1 reply] : Apparently you'd have to override the doFilter function, since current... (by Cubbi)
Which substitute for non-type template parameter ?
 
Hi all, I would like to define a templated class with a non-type parameter like this : template <int s> class C40 { public: int m ; int other1; f...
[16 replies] Last: Notice that if you'd actually compared apples to apples (heap-allocat... (by Cubbi)
Quicksort Template function
 
Hey everyone. I'm having problems implementing a quicksort template function, to sort a vector of class pointers. I'm getting the following error: error C2664:...
[4 replies] Last: Good point. That resolved that error but creating a plethora of other ... (by optimus203)
C++11 question
 
I know this might be a spam question,and please understand this.I'm new to this forum,so if by any chance I got onto a wrong forum,don't go too hard on me. O...
[4 replies] Last: The problem is that in fact there are no books on the new standard. Bu... (by vlad from moscow)
Question concerning accessing vector elements, and classes
 
Two questions: I'm wondering if it's possible to keep track of an element of a vector by using the elements' address. Like if the vector is constantly changi...
[2 replies] Last: 1: It's better to do any "messing around" via member function of the o... (by Computergeek01)
by taboad
how to read each line and make calculation
 
I have a txt file, and it has 4 columns and 20 rows. What I need is to find a calculation for each of the lines. For example, for the first line (=first row)...
[1 reply] : How is the data delimited? (by Computergeek01)
by roarkr
how to find ip adress of running server
 
hi i have a server program running. now i need to specify the ipaddress of this server in a txt file. the client program reads the user defiened ip adress when...
[6 replies] Last: If your server is running on something where it can dictate the host n... (by Computergeek01)
I NEED HELP PLEASE! C++ etch a sketch program
 
Hey guys, i just really need help with a programming i have to create for a class and i honestly dont even know where to begin and its due tomorrow. Can someone...
[5 replies] Last: You have off-by-one errors with your array indices. Remember,valid val... (by Duthomhas)
April 2012 Pages: 1... 1617181920... 49
  Archived months: [mar2012] [may2012]

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