Beginners - October 2012 (Page 11)

Weird Error..
 
Hey there, this is my code: #include <iostream> #include <iomanip> using namespace std; struct american { int ounce; int tablesp; int Teasp; }; amer...
[3 replies] Last: herp derp! lol i can't believe i didn't catch that I'm getting errors ... (by MrHatchi87)
Chutes and Ladders Help
 
Hello! I'm currently a beginner to C++ programming and have ran into my first stump with a program, specifically with Chutes and Ladders. I'm completely clueles...
[2 replies] Last: You could have a bool that's true when it's player one's turn and fals... (by Gulshan Singh)
Help with Error" cannont convert to bool
 
/* File: isprime.cpp Created by: ???? Creation Date: ???? Synopsis: This program reads in a minimum and maximum integer greater than 1 and ret...
[10 replies] Last: I just now have to figure out why its working now but it wont actually... (by ProgramingNewb)
by khal
template class
 
Hi, I created a template class with two template parameter. template<class T, class Y> class Test { //... }; In my main I want to pass a vector with the c...
[2 replies] Last: From what I can tell it looks like you're trying to pass an object thr... (by Gulshan Singh)
ENUM FUN SOS!
 
Hey. I'm trying to get my enums right. I have a function called hangman below and at the bottom there are condition on returning what type of enum to main. I'm ...
[5 replies] Last: why do you use an ifstream in line 22? EDIT: never mind... :p EDIT2:... (by I v a n)
Pointer in Object
 
I'm wondering if I use a pointer inside an object and the pointer is from an object that keeps allocating more memory constantly, if the former object's size in...
[4 replies] Last: Yes. The list is off in memory somewhere. All the object contains is ... (by Gulshan Singh)
Using Arrays and Functions to calculate parallel resistance
 
Well here is a code I had came across and learned from to do one of my previous projects. My new project is to calculate resistance of 10 or less using Arrays a...
[5 replies] Last: Well, I don't think Retval should be an integer. Double would seem a b... (by Chervil)
E-mail C++?????
 
I was wondering if it is possible to program an e-mail service with C++. If so, what techniques would I need to know? Thanks in advance!
[no replies]
by khal
Another struct question
 
This my .h private: struct test { Key obj; vector<Value> contain; test( const Key & e = Key( ), const Value & a = Value()) ...
[7 replies] Last: Okay that works. Thanks for being so helpful and patience, I really ap... (by khal)
Binary search tree getting depth of each node
 
Im trying to traverse a binary search tree and get the depth of each node and sum them up. Im using a file which has 7 numbers "nodes" 4 6 7 5 2 3 1 ...
[no replies]
by hjone
How to end loop??
 
I need to prompt the user for a word, and repeat the prompt until the input given has no non-whitespace characters. How would I set up that loop?
[1 reply] : std::string word; do { std::cout << "Enter a word: "; std::getlin... (by vlad from moscow)
Header files, Classes and Constructors.
 
Hey guys, I'm matt, and these are 3 things I hate. More fool me for missing the lectures about them but I'm completely stuck. Part of what I'm trying to do i...
[4 replies] Last: Perfect, cheers :) I'm gonna shoot off and crack on with it and hopefu... (by Velcrohead)
by rm214
1 error between program fail and success
 
Hi, I posted about a week ago and have since nearly finished my code but it keeps printing the grade 'Z'. Why! Been trying to figure out forever and I can't s...
[3 replies] Last: Andy - I apologize for the format, I threw it up quick and continued t... (by rm214)
by enemy
functions
 
Dear All! Excuse me, could anyone give me a hint how to draw a line using functions and get the next: the line consists of a b, like: aaabbb how do I ge...
[6 replies] Last: How can I get to another line from a loop writing strings? (by enemy)
by dcftci
errors
 
what does this suppose to mean Unhandled exception at 0x778815de in iris.exe: Microsoft C++ exception: std::out_of_range at memory location 0x002af564.. I...
[8 replies] Last: Use the debugger. It will break as soon as the error is thrown and you... (by IceThatJaw)
Array Inputs and Functions
 
The program uses a function to return the multiple of the two largest inputs from 3 different arrays. It would be the two largest, from the 3 arrays the fir...
[2 replies] Last: Thanks a tons, I really appreciate it. (by MOSKing)
Why am I getting this error?
 
Hi, So I just started learning C++ (I'm Microsoft Visual C++), and I was working on a program that shows the relationship between two numbers. This is wha...
[2 replies] Last: Thanks! I guess I didn't check everything over well enough myself. (by nerdygirl)
Function declaration/definition
 
My understanding of the use of function declarations/definitions is the follows: You wouldn't define a function just in your source code as you would have to...
[8 replies] Last: Okay I've pretty much got it now...thanks for your help (and patience!... (by Amnesiac)
by dcftci
FOR LOOPS
 
hi, Is it wrong to construct a for loop like for(i=1;i<=7;i+2) {.....}
[7 replies] Last: At the beginning I thought of double double plus too:))It's good to le... (by dcftci)
Returning values through pointers in functions.
 
Hey guys, I'm new to c I've been having trouble with my understanding of this stuff; how would I go about returning three values to my main from a function usin...
[3 replies] Last: #include "ctype.h" to use it. (by Moschops)
October 2012 Pages: 1... 910111213... 84
  Archived months: [sep2012] [nov2012]

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