General C++ Programming - December 2008 (Page 6)

Incorrect product with calculator program
 
So i wrote a multiply-only calculator program, and it functions fine except for that when i attaempt to multiply the two values, it gives me a ridiculous produc...
[4 replies] Last: The simple answer is that it causes the system to display "Press any k... (by Faldrax)
ascii to text conversion
 
Hi folks, I have recently created a converter that converts text into ASCII and then into radians. This part works fine. Now when I try to re-convert radians ...
[4 replies] Last: The problem is that you're depending on a level of precision that floa... (by helios)
by pamela
Peanut Butter and Jelly sandwich
 
Can anyone write this in C++? Start with one jar of peanut butter, one jar of jelly, and two knives in front of them on a table. End with the sandwich made an...
[5 replies] Last: Hamburger earmuffs. (by scythe)
Dynamic array of function pointers
 
To put it simply, I want to change the following, void (*function )(); to void (*(*players_ptr))(); and dynamically allocate an array of function pointe...
[5 replies] Last: Thanks guys, worked great. (by narcissisticcheer)
by Timbo1
Calculator Feedback
 
could anyone give me feedback on this calculator I made? http://www.mycoolpsp.xf-s.com/Calculator1 5.exe Thanks
[2 replies] Last: [insert bad joke]I tried to feedback it, but I got a not enough energy... (by firedraco)
by am1767
Randomizing words in Hangman
 
Ok so I'm having difficulty creating my hangman game. I've started with some code and I'm currently stuck at randomizing my mystery words. This hangman selects ...
[1 reply] : Well, what you could do is read the entire file into an array and then... (by firedraco)
Where am I going wrong with these calculations?
 
Hi, Im writing a program that has to calculate the cost of apples and oranges. Everything is fine except the part where I calculate the variables. My teacher...
[5 replies] Last: Well you have to look at the calculations: totalappcost=numapple... (by giantMidget)
How to make a program repeat 1000 times
 
I have been trying to make this program repeat 1000 times heres my code please help! #include <iostream> #include <cmath> #include <cstdlib> #include <ct...
[4 replies] Last: Whoops, I apparently missed the i=1000...somehow... >.> (by firedraco)
Calculating the number of sec's elapsed between two time intervals?
 
How can i calculate the number of seconds elapsed between two times intervals... for example i define a date for example from 1/1/2005 and i ask the user to p...
[1 reply] : http://www.cplusplus.com/reference/clibrary/ctime/mktime.html (by helios)
Populating an array of stucts
 
I am working on an application where I need to store data in an array of stucts. The issue that I am running into is that I do not know the length of the array,...
[12 replies] Last: Well what I am trying to do is create a multidimensional vector array ... (by rottmanj)
by Jerod
libPNG Image distortion
 
I am writing a small MFC app to display a PNG image using libPNG (along with zlib). This app is being used to view texture pallettes in their PNG form. The is...
[no replies]
Image as output!
 
Hi, I'm writing a program that should produce an image as the output... Can anyone help?
[6 replies] Last: Wooo - your code worked fine by the way - i didn't realize you could d... (by Mythios)
by Ultima
Short Question : Conditional Operator
 
Hi guys ^^ just a short question regarding conditional operators. for example, i have: (condition)? (if true) : (else); How do i make my (else) void or...
[6 replies] Last: Thanks helios, i just replace the else operand with an a xD that solve... (by Ultima)
sorting linked list of names
 
I'm trying to figure out a good way of alphabetizing a linked list of names where every two nodes consist of a first name and a last name. The program I am work...
[8 replies] Last: An STL list is a class implementation of a linked list which manages t... (by jsmith)
Accessing data of list in a vector??
 
Hi I'm new to c++ and I'm trying to print out the data (x_data) in a list, in which the list is part of a vector. I just can't seem to access the data in the li...
[2 replies] Last: thanks! that worked and made sense! (by metalem2)
#define before #include
 
#define _CRT_RAND_S #include <stdlib.h> // for rand_s This and some other defines must be declared before certain includes. Is there a way around this, in c...
[3 replies] Last: You could put those two lines in a header of their own and include the... (by helios)
i/o simultaneously
 
i have created a loop for displaying the first 99 natural numbers and have also used delay(1000); between each output. However i want that if the user enters...
[4 replies] Last: Either you thread it, or as Bazzy said. You can get the keyboard statu... (by Zaita)
Why do I get Segmentation fault?
 
My code is that: int main(int argc, char *argv ) { int a, b ,c; char numc ; int numi ; (Getting String from the user and putting it inside ...
[8 replies] Last: http://www.cplusplus.com/forum/articles/1624/ (by Zaita)
by Deimos
My IDE's can't initialize a console window
 
Greetings, everyone I have this really frustrating problem that has already happened to me in various IDE. First I had Dev-C++ and at some point the CTRL+...
[12 replies] Last: I'd like to see it. If there's a killer bug in the program, it would i... (by helios)
Code Performance
 
How can I learn my code performance?? for example I write a code but is it a good code or not? I wanna learn a time what time my code neeeds? before...
[7 replies] Last: Oh my God :)) you are wonderfull jsmith . I am a student and we... (by ShyRain)
December 2008 Pages: 1... 45678... 10
  Archived months: [nov2008] [jan2009]

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