Beginners - October 2008 (Page 6)

Adding the sum of the digits in an integer
 
Hello, I read that I'm not supposed to ask for the solution to homework assignments, which is fine by me. I'd rather work out the problem myself, else I'll neve...
[5 replies] Last: Actually, from a certain point of view, you all are wrong. This is imp... (by QWERTYman)
by kg123
A little problem
 
This program is designed to show the time,with the user inputs hours,min,sec. #include<iostream> using namespace std; class Time{ public: void set(int...
[6 replies] Last: @guestgulkan I was taken aback by the question, because I was sure it... (by Timaster)
Multiplication table
 
How do I Ask the user if they would like to enter two more integers (i.e. run the program again): repeat if yes, quit if no. this is what I have #include...
[1 reply] : Read: http://www.cplusplus.com/forum/beginner/5082/ (by Zaita)
by soryan
string question
 
hello, I've been working on a problem, yes for a class, I have to evaluate an expression and do the arithmetic for a string for example "+98-45+34+369+97-198...
[4 replies] Last: Have a look at: http://www.cplusplus.com/forum/beginner/5053/ (by Zaita)
TIMER problem
 
#include <iostream> #include <time.h> #include <stdio.h> #include <conio> void pause(int seconds); int main() { int a; time_t rawTime; struct tm* loc...
[5 replies] Last: I still cannot figure it out ,i tried several other ways but the time... (by Zaita)
by ruby09
Can't find errors
 
1)what is wrong with the following program? #include<iostream.h> //Line 1 using namespace std; //Line 2 int main() //Line 3 { intx = ...
[2 replies] Last: Don't give him his homework answers please. There is also another i... (by Zaita)
by quant
array structs?
 
How to rewrite it synonym to the array structs? typedef map<pair<u32, string>, u32> find; Please, sample.
[4 replies] Last: Your going to have to write or your implementation of a map in C, as t... (by Zaita)
Assist with shapes please
 
I want to create a shape at an angle (ie square). Is the only way to do that using Rectangle(Win, x1, y1, x2, y2) by the x and y coordinates or is there a...
[1 reply] : What environment are you working in? Gui Toolkit? OS? http://www.... (by Zaita)
Reading input using .putback()
 
Hey all, I'm having a "wtf" moment... Perhaps someone could assist. In this program, the user inputs commands to perform basic arithmetic operations in Engli...
[7 replies] Last: It's not suppose to be an answer for you. Merely an illustration of a ... (by Zaita)
by ruby09
arrays
 
1)If list is an array of five components of type int. What is stored in list after the following c++ code executes? for (i=0;i<5;i++) { list =2*i+5 ...
[2 replies] Last: ok, thanks..... (by ruby09)
by ruby09
Problem with some exercises
 
1)write a c++ statements that do the following: a) define an enum type, bookType, with the values MATH,CSC,ENGLISH,HISTORY,PHYSICS, and PHILOSOPHY. b) decla...
[3 replies] Last: Hint: cout << static_cast<int>(WHEAT); will help you solving 2.a ... (by Bazzy)
by Scipio
Some general questions
 
Hi everyone, I am pretty new in programming and have learned the basics of C++ in the past few weeks. Now i have a few general questions: What is the best...
[8 replies] Last: Thanks for all the help. cin.ignore() and cin.get() both do what i ... (by Scipio)
dynamic memory, pointers not lvalue
 
Another programming exercise question. This is trying to teach me dynamic memory allocation, but I am lost. I'm supposed to use "a pointer to pointers to str...
[9 replies] Last: Sure. Yes, it's important to learn the fundamentals of arrays and... (by jsmith)
by DNRN
function to print a list <solved>
 
Hi I have some problems making a function that can print out some different lists. In main() I can do this with: list<string>::iterator i; for( i = a1.b...
[3 replies] Last: Use list<string>::const_iterator i; instead. That will fix you... (by jsmith)
C++ input/output surface area
 
I have to make a program that calculates the sum of the surface areas of four geometric figures and outputs the total square footage of it. The program works...
[4 replies] Last: You're going to need to think about how the text file are going to be ... (by danthehat)
error LNK2001: unresolved external symbol
 
when i try to build my code (Mine Operation Simulator.cpp) so it can be run it gives me this error; Line Operation Simulator.obj : error LNK2001: unresolved ...
[2 replies] Last: you use the static keyword when declaring the function inside the cla... (by MBattiston)
Highest Number Errors
 
My code is designed to pick the highest number out of five inputted integers and display it to the user, but I'm getting several errors throughout lines 31 - 6...
[4 replies] Last: Thanks! That worked perfectly, and shortened my code greatly. :) (by CheesyBeefy)
initializing arrays (1,2)
 
when ever i try to initialize this array this way it gives an error char alphabet = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','...
[28 replies] Last: cheers jsmith it worked perfectly (by MBattiston)
calculating highest number in a variable loop?
 
Trying to figure out how to do some homework and cannot figure out what operator to use to finish this program up. Tried doing some searching and experimenting ...
[3 replies] Last: Indeed, the hardest error are often the simplest, don't worry about it... (by firedraco)
by corey7
I have a problem...
 
I am just starting to learn how to create functions and call them. I have to write a program that does what you will see in the main() part of the program but ...
[3 replies] Last: No, parameters are for a different purpose. The return type makes no ... (by firedraco)
October 2008 Pages: 1... 45678... 20
  Archived months: [sep2008] [nov2008]

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