Beginners - May 2010 (Page 21)

inputing a file with unix command
 
So say I have a program called detect_cycle.cpp Then I compile it and name it detect_cycle Then from my unix terminal I type: detect_cycle < data_file ...
[9 replies] Last: @moorecm Okay... I need to brush up on my Unix shells (I've been us... (by Albatross)
C++ GUI Question
 
I'm new to C++ GUIs. I've only over used command line before. I want to make a very simple game with C++ GUIs. I'm am currently using DevC++, but I can use Visu...
[1 reply] : Don't take my word for it, but personally i'd say that the SDL library... (by AngelHoof)
Tax bracket function
 
So I am trying to write a program where the user inputs their income then the program tells them which bracket they are in. I want a function that computes the ...
[10 replies] Last: Yeah, you just need to change your comparison operator from || to &... (by Da0omph)
the code not work
 
If you enter a word then it shows "please write a number" and close the program quickly #include <iostream> using namespace std; int main() { cout <...
[3 replies] Last: [quote=packetpirate]First of all, what the hell is "cerr"? You might w... (by Incubbus)
M41A Pulse Rifle airsoft gun
 
Hi, I am trying to build a M41A pulse rifle from Alines and was woundering how to go about building it. I wanted to have a chip or something to make the sound e...
[3 replies] Last: Any programming you do won't be done in C++ (by packetpirate)
by Zifker
Attempting to finish a project for my course
 
I'm trying to build a program that prompts the user to enter an employee name and the number of hours that employee has worked, then outputs a small dossier tha...
[9 replies] Last: Thank you so much for the help! (by Zifker)
by yk1
ambiguous symbol error using overloaded operator+
 
This is a pretty basic program to learn how to use overloaded operators (specifically + in this case). I want to be able to add distances of miles, feet, and i...
[2 replies] Last: wow that's all it was haha. I changed distance to Distance and it... (by yk1)
by Rhap
Small error with Color in class
 
//// point.h using namespace System::Drawing; class point { protected: int x; int y; Color col; public: point(); }; ////c...
[no replies]
fmin/fmax
 
hi, need to write fmin and fmax functions can anyhelp help implementing? would this work? double fmin(double a,double b) { return (a<b)?a:b; } dou...
[1 reply] : Yes, except I would say a fmax() would read better as a>b rather than ... (by PanGalactic)
Craps game homework assignment
 
Dear Cplusplus forums: First and foremost, I did read the stickied post at the beginning, and I will NOT be asking for the answer to this homework problem. I...
[15 replies] Last: Everything looks good, but there is still a small issue with determine... (by Archaic)
How does this generate algorithm work?
 
Hi, I'm fairly new to c++ I'm at the end of my first course in object oriented c++ programming. In one of my assignments I want to fill a vector<int> with num...
[2 replies] Last: Thank you very much guestgulkan, with your response and a little furth... (by SirSkorpan)
figuring out an error
 
I have an error problem I can't seem to figure out. error message: 1>c:\documents and settings\student\my documents\visual studio 2008\projects\04shoemake...
[4 replies] Last: thanks! now, i have these errors: 1>c:\documents and settings\st... (by kkerriny)
by Deluge
Print "01" in Place of "1"
 
I just read how to do this two days ago, but can't remember where I saw it. What I am trying to do is take in integer value int x = 1; and have it print out ...
[1 reply] : if (i>0 && i<10) cout << 0; cout << i; Also: [quote=dwhi... (by Deluge)
Weird Error
 
#include <iostream> #include <string> #include <list> #include <deque> #include <vector> using namespace std; template <typename stlObject> void P...
[12 replies] Last: here is how to start your own topic. Select the forum you want to pos... (by guestgulkan)
list of pointers to objects
 
what's wrong with this code?? static list<Body* > _bodies; this is in a class declaration and static void add_body(Body &b) { Environment::_b...
[3 replies] Last: Going back to the original code; what's wrong with this code?? ... (by guestgulkan)
by Nikoru
Question: Pointer
 
Okay, so I have been doing more and more tutorials and I have been learning alot. However, I had a couple of questions: #1. Can you use a pointer to change a...
[6 replies] Last: No. A pointer is an alternative way to access data. Using a pointer to... (by closed account Lv0f92yv)
Find the sum of digits of 2^1000
 
Hi. I am trying to do this question http://projecteuler.net/index.php?section=problems&id=16 Can anyone tell me how to approach this problem in detail? Tha...
[10 replies] Last: i finally figured it out.....all i had to do was remember how to multi... (by sanalsprasad)
by Nikoru
The best Tutorial that I have ever seen!
 
http://www.youtube.com/user/antiRTFM#p/c/1D10C030FDCE7CE0/0/tyVhn0FWWB4 These tutorials have been just what I have been looking for. The guy explains everyth...
[no replies]
Comparing files
 
Hi everyone, A book I'm following has had me write a utility to compare the size of two files. I have checked over the code and it matches that of the book, ...
[10 replies] Last: Ah, I bet you were in a different working directory than the program. ... (by Duthomhas)
double pointer / indetermined-sized matrix
 
Hi, all. I'd like to know how to define a list of an indetermined number of elements, each one of these is also a list of indetermined size. Imagine a matrix...
[1 reply] : Hi, again. Well, sorry for posting... it seems that I found a solut... (by Porras78)
May 2010 Pages: 1... 1920212223... 33
  Archived months: [apr2010] [jun2010]

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