General C++ Programming - November 2013 (Page 38)

by nickd5
Help with drawing
 
#include <iostream> #include <fstream> #include <string> using namespace std; void printSpace(ifstream& , ofstream&); void printP(ifstream& , ofstream&...
[no replies]
Exit a Program
 
Hello. How do I exit a program. What is the code so that when a variable (of my choosing) is entered, The program displays a message and quits? It is probably r...
[5 replies] Last: No. If you have to do that, you have a design flaw, but if you can't f... (by LB)
Clearing a Certain Section of the Screen
 
Hello. I want to have my program only clear a section of the lines displayed on screen. For example if: Welcome. Enter Blah Blah: (cin) Choose a mode: (cin...
[7 replies] Last: I'm not trying to be rude or unhelpful, I'm just trying to point out t... (by LB)
Need to make a Looping Program
 
Hello, I was wondering if some of you people here could help me out with some code. I want to create an endlessly looping program only stoppable by CTRL+C. T...
[3 replies] Last: Thanks for the replies. (by John English)
by seerax
Prime Numbers
 
#include <iostream> using namespace std; int main() { //input output cout << "please input a number" <<endl; int inputtedNumber; cin>> inputted...
[1 reply] : Here's my algorithm #include <iostream> #include <cstdlib> #include ... (by greenleaf800073)
A program that could calculate how many Xs or/and Ys from specific range. X and Y are numbers.
 
for example: how many 2 or/and 5 are inside range of 0 to 30. for or: there are 8 (2,5,12,15,22,25) for and: there is only one (25). Could anybody help...
[1 reply] : Do you know how to extract the last digit of a number? Hint: it involv... (by LB)
system ("PAUSE") Without Message or Button Press
 
Hello. I would like to have my program pause at a certain screen but not to have the "Press any key to continue..." message or the press of a button. In my prog...
[1 reply] : http://www.cplusplus.com/forum/beginner/1988/ (by LB)
Calling function in custom class using pointer
 
hello all, right now I have code #include <iostream> using namespace std; class Rectangle { private: double width; double len...
[1 reply] : I have an idea: copy and paste the exact errors you are getting, and d... (by LB)
permutation algorithm
 
Hi everyone, This is really an algorithms question. I want to generate a set of permutations but not in the ordinary way. I know that I can use <algori...
[4 replies] Last: So I will have to use stringstream to access each element to convert i... (by rozick1)
I have to create a payroll program
 
I'm building a payroll program for school that prompts the user for several inputs, one of them being the hours worked for five days, inputted with spaces. Do ...
[2 replies] Last: We were on the same page. Already figured it out, but thanks for the r... (by br26354)
regex error with valid regex string
 
I've tested the string and found it to be valid (as it should be) and it matches in perl, but in C++ it throws a regex_error with code 4. For the life of me I c...
[6 replies] Last: The GNU C library has long had a <regex.h>, which is very useful. Giv... (by Duthomhas)
dynamically allocated Hash Table
 
Hey guys I am trying to wrap my head around implementing this. I have an abstract based class and three derived classes. I also have a templated hash table clas...
[3 replies] Last: Thanks for the advice i decided to go with a vector (of stl lists), an... (by pfunk35)
Passing data between threads.
 
I have a main thread and a worker thread. How do i pass data between them when both are already running without using global variables?
[1 reply] : publish and notify, push on a thread-safe queue, there are plenty of m... (by Cubbi)
Squares Program
 
Can anyone help me? I have no idea what to do.. This is my assignment: Write a program to do the following: • request that the user input a number between 1 ...
[9 replies] Last: I'm talking about the spaces in the middle of the square. I can get th... (by BrookeP)
sdl prob
 
I think that the getpixel function (existed in sdl documentation) gets the color of the coordinate indicated by x and y Uint32 getpixel(SDL_Surface *surface...
[2 replies] Last: So how can I know that the color return by the getpixel function is wh... (by closed account 28poGNh0)
Differences
 
Hello everyone, what are the differences between 0 and NULL?
[2 replies] Last: Thanks! (by BlueSheep)
output doesn't output what it is supposed to
 
Write a program that can be used to train the user to use less sexist language by suggesting alternative versions of sentences given by the user. The program wi...
[3 replies] Last: line 69 missing "=" line 99 instead of "i+" "i=" line 107 instead of "... (by Chriscpp)
Multiples of 4
 
Hey guys, here is the basis of my program: float x; //start number float y; //end number cout<< "Hello, please enter a whole number that will be the ...
[10 replies] Last: Yeah, this fixed it Duoas. Thanks! (by VincentOrfeo)
by OJ007
Use of Class Template Requires Template Argument List
 
I'm not sure why I am getting these errors. I've looked all over the forums and tried everything I can think of to fix them. any help would be greatly appreciat...
[4 replies] Last: [quote=OJ007]I'm novice at classes so I don't completely understand sp... (by LB)
by Snaksa
Structure of a program
 
Hello! I want to try to make a Snake Game. And I want this game to have menu which contains "Play", "Options", "High Scores" and "Exit". When "Play" is chosen...
[11 replies] Last: You're welcome! (by MikeyBoy)
November 2013 Pages: 1... 3637383940... 46
  Archived months: [oct2013] [dec2013]

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