General C++ Programming - December 2012 (Page 34)

by Andym
Quadratic Equation & imaginary numbers
 
I have been looking for about a week now and I cant seem to find exactly what i am looking for. I am writing a program for the dreaded Quadratic Equation. it ...
[7 replies] Last: I've been messing with it for an hour and you guys get it in like 5 mi... (by Andym)
Need some help with passing structure pointers
 
#include <iostream> #include <fstream> #include <iomanip> using namespace std; struct record{ int id; int cost; double price; ...
[no replies]
How to properly use cases and case matching?
 
Hello, I am working on a Text adventure game. I am trying to use a switch a return value for input by a player, in order to eliminate infinite loops when a w...
[no replies]
by xzki
How to loop program back to start when finished?
 
solved:D
[4 replies] Last: Yeah, I'll give it a shot, but I've been working between mac and windo... (by tirvine13)
Strings
 
I have been given this question: Develop an array of characters that contains the phrase "Wow, it is really hot in this room.". Then create a vector of stri...
[1 reply] : Your program is meant to take in a second input which establishes the ... (by buffbill)
Changing a phrase into dashes
 
Hey there, I have made this piece of code to change Travis is cool also ______ __ ____ ____ however it is just giving me big ____________________ strin...
[1 reply] : Well you don't have anywhere in the code that would put a " " in hyphe... (by freddy92)
simple SFML UDP client/server cannot send packets
 
The expected behavior is for the client to send a packet containing an ID, x, and y value and for the server to receive the packet and print out the x and y. At...
[no replies]
OpenGL/GLUT - Changing coordinate system?
 
Hey. I'm using OpenGL/GLUT. Currently the coordinate system is like this $ = -2, 0 + = 0, 0 # = 2, 0 @ = 0, 2 & = 0, -2 % = -2, 2 +-----------+ +-----------...
[no replies]
FILE
 
Is it possible to use information in FILE to locate first data byte in RAM if the file system created in RAM?
[1 reply] : No (unless you're writing a kernel mode driver), but it is possible to... (by Cubbi)
by noo1
overload + and - are not yielding correct results
 
I have 3 files compiled with the code below. I am not getting the correct result when I add two numbers with the overload functions. Can anyone shed any light...
[7 replies] Last: So, does it work now ? (by toum)
Sorting two arrays to one
 
Hello, i want to put two arrays in one and arrange it so that it is constantly increasing. The precondition is that both arrays have elements in an increasing o...
[2 replies] Last: I solved in the end! #include<iostream> #include<vector> using names... (by johanlaas)
[Request] Help on a do/while loop
 
I'm trying to make a program that will allow a user to decide whether or not to repeat the program at the end. My program asks for user input, and based on wha...
[2 replies] Last: Thank you very much! I knew it was something simple. (by alexman17c)
by ktm
Reading a .csv file
 
I have to read a .csv file that contains Frequency, amplitude and duration in each line separated by commas. My code looks like, whi...
[1 reply] : Start reading here http://www.cplusplus.com/forum/lounge/85957/#msg461... (by Duthomhas)
Queue and Enqueue
 
Implement a stack class template then simulate an array based queue data structure with two stack instances. Implement a queue class template. Remember t...
[1 reply] : Here's a stack: template <class T> class Stack { std::stack data; pu... (by Stewbond)
Design an I-pad class
 
You are to design an iPad class. Implement following classes: class Camera; class Phone; class WebBrowser; class Mp3Player; class DVDPlaye...
[3 replies] Last: Oh come on, you must be able to do something. How long have you been ... (by ajh32)
by beeb
2d array
 
I'm trying to output the cities the user inputted with commas and space. for example New York, New Jersey, etc. I understand the rows and columns of a 2d array....
[13 replies] Last: That's why I used: cin.sync(); cin.getline... see my code above... (by ajh32)
by djump
delete [] and multidimensional arrays?
 
If I'm doing something like this: void function() { int my_int ; for(int i=0; i<5; i++) for(int j=0; j<6; j++) for(int k=0; k<7...
[5 replies] Last: The only case you need a delete operator is in case you new'ed a mult... (by S G H)
by arsyyn
Need help reading data files!
 
Hi, so I'm having some trouble reading data files. What I need to do for my project is read in a list of names along with numbers (things like salary) beside th...
[2 replies] Last: I would also make a struct that contains: first last middle num1 n... (by mhaggard)
number display precision
 
Hi, I wrote some code to calculate variance of data. From calculation with Excel, the result should be 801.1667. However, when I use the following code to di...
[3 replies] Last: Oh thanks, I just forgot that small thing in the command. Problem solv... (by dekeenfrance)
company system in C++
 
what I have done so far is #include <iostream> #include "conio.h" #include <string> #include <string.h> using namespace std; int main (){ cou...
[1 reply] : Double Post: http://cplusplus.com/forum/general/87159/ (by cnoeval)
December 2012 Pages: 1... 3233343536... 43
  Archived months: [nov2012] [jan2013]

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