Beginners - November 2009 (Page 3)

Program fail
 
/* Kalkulator s passwordom */ #include <iostream> #include <string> #include <cstdlib> #include <cmath> using namespace std; int main() { string pas...
[2 replies] Last: /solved/ Thanks (by closed account 2E0XoG1T)
by GlennC
References and inheritence
 
Hi everyone, I want to define a class hierarchy where all classes inherited from the base class inherit a member which is a reference. Is this possible sinc...
[2 replies] Last: Great - thank you. (by GlennC)
Game of 21. A lot of Errors :(
 
I don't know what is wrong with this. And the IDE I'm using is Visual Studio 2008. #include "stdafx.h" #include <iostream> #include <ctime> #include <str...
[7 replies] Last: My program finally runs but there is something wrong with the hit func... (by gcarlson53)
Standard Deviation problem!!!
 
I was assigned a problem that allows the user to enter a quantity of integers using an array. It prints out the values, the average, and the standard deviation ...
[10 replies] Last: Thanks for all your help Ray!! If I have any other problems will be ha... (by ohsnap1319)
specifying templated class types
 
Hello all, I'm trying to write an implementation of a 2-3-4 tree in c++. I'm it's been a while since I've used templates, and I'm getting some errors. H...
[6 replies] Last: I guess my question is, "How do I specify the type of a templated typ... (by Disch)
Some questions on graphics and color
 
OK, so I'm obviously very new to these forums, although I've lurked for a long time. Before posing my questions, I just wanted to say that my skill level with C...
[8 replies] Last: Only Vista and 7, not XP or older (by Bazzy)
Dynamic Memory Tutorial Example Q
 
In the dynamic memory page in the tutorial on this site, some example code is given to show the use of the operators new, new , delete, delete , and the nothrow...
[2 replies] Last: 1) The initialization (n=0). This is performed once when the loop fir... (by CecilSunkure)
Arrays and output
 
I am attempting to use an array but when I do the first character is always missing. Help! #include <iostream> using namespace std; int name() { c...
[2 replies] Last: cin.getline ( name, 8 ); (by Bazzy)
Generating passwords
 
there is this assignment we have that is due after 6 more hours later, i'm pretty stuck, need some help... not sure how to make use of the "srand" : ( ...
[6 replies] Last: Like this: char letter = (char)number; If number is 65, letter wil... (by chrisname)
by Mike W
Converting C++ Console Applications to GUI-Based
 
Hello, I was just wondering how I could convert my C++ console application that calculates the area of a circle to a GUI-based application where the user cou...
[7 replies] Last: Yeah that sounds like a good idea. I've seen the API for QT before an... (by Mike W)
type Date
 
how do I get the type Date to work in the compiler?
[5 replies] Last: http://www.cplusplus.com/forum/beginner/16735/ (by Bazzy)
by ata88
Hypotenuse Calculation Problem
 
// Hypotenuse #include <iostream> #include <cmath> #include <cstdlib> using namespace std; int main() { int x; //position of x-axis int y...
[4 replies] Last: Is a data type for double precision floating point numbers http://ww... (by Bazzy)
problem with cin
 
i am coding a programe and i need to output hello when the user enter double spaces " " without quotions , my code is char c,d; while(cin>>c>>d) { if(c=...
[1 reply] : >> discards spaces, try cin.get(c) (by Bazzy)
Problem with Converting numbers to strings tutorial
 
I was working through the tutorial posted here http://www.cplusplus.com/articles/numb_to_text/ in the Articles section. I was hoping someone might take a mom...
[4 replies] Last: Thanks for your help Bazzy. The information in that link helped me sol... (by CamelCasing)
by drzura
Not limiting the size of an array with a base struct?
 
Hello all. I am taking a beginning C++ class and am having problems with a section in my assignemnt. I thought with arrays, you had to assign them a size. Fro...
[9 replies] Last: You may want another item to count non-alphabetical characters (by Bazzy)
program cannot run
 
There is no error when I compile my code. However when I run it, there is an announcement said my program had encountered a problem and needed to close " Is th...
[2 replies] Last: the code is quite long, so I upload it here http://www.mediafire.com/... (by Progesco)
multiple types in one declaration
 
Here is my code #ifndef QUEUE_H #define QUEUE_H #include "Message.h" #include <iostream> using namespace std; class Node { public: ...
[2 replies] Last: thank you (by Progesco)
file output, wtf?
 
Ok, i have a weird problem with ofstream.when i type ...>>i>>endl; it allways prints on the same line. How to make that ofstream would ignore everything and pr...
[1 reply] : Open with ios::app http://www.cplusplus.com/reference/iostream/ios_bas... (by Bazzy)
How to get a true bool if a number is primary
 
Hey all! I need help. Im trying to make a program that will cout every number from 1 to 1000 that is prymary (1,2,3,5,7). I dont need the whole function, i...
[1 reply] : http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes there have been ... (by closed account z05DSL3A)
STACKS
 
Hi there! Tonight I'm having a c++ test and I still cant understand how to work with stacks. I need a brief explanation 'cause I can memorize the program but...
[3 replies] Last: I've reformatted the code and will go through it for you. #include <... (by kbw)
November 2009 Pages: 12345... 25
  Archived months: [oct2009] [dec2009]

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