Beginners - July 2012 (Page 39)

structure error
 
Hi, My structure looks like this: struct stureg { char fname ; char lname ; char stuid ; } stureg; It works fine but when I change c...
[3 replies] Last: C++ has an overload operator >> for class ifstream when the right oper... (by vlad from moscow)
Towers of Hanoi
 
I've written the program and it is currently running...and running...and running. My teacher wants us to test it for 100 disks. Some other classmates said thi...
[1 reply] : for n disk Tower of hanoi require 2^n-1 moves so, you can think about ... (by HiteshVaghani1)
C++ and math.
 
So I recently migrated from Matlab to C++, on the account of being in the finance industry which insists on maintaining C++ as the standard. However, as I'm gro...
[2 replies] Last: Thanks for the help, this will definitely get me started. (by KalmanFilteredCoffee)
multiplying two numbers in an array to get another array
 
Hi! I'm trying to create a program where I have a user enter in the number of trips, then for each of the trips enters in the trip number, miles, and the cost t...
[3 replies] Last: Well how about one of these two approaches. You could create a class ... (by Tresky)
Expression not constant in switch statement?
 
Hello, i started a thread last week about a problem i had and i couldnt solve it. I got a tips to use constexpr but i felt it would make my code very unstructu...
[13 replies] Last: Sorry, when i look at this solution i realize ive been really stupid. ... (by stoffe1100)
Class creation with multiple use
 
I am having a few issues with this program, they stem from passing the color.h and .cpp into another .h and .cpp, and frankly getting how those two things reall...
[no replies]
Stumped
 
Hello, I'm not asking anyone to write the code for me but maybe someone can give me some pointers on getting started with this assignment? The syntax is giving ...
[7 replies] Last: There are only 6 lines, not 7? (by beakie)
My struct object in another class doesn't exist?!
 
PROBLEM HAS BEEN SOLVED I'm having some major issues with using structs in other classes. I'm using an IDE that uses header and source files for differ...
[2 replies] Last: The error message you ask for was just in a line inside main (line 25,... (by AlanCOBOL)
Seperate file, type conversion
 
Hello everyone, I have two file, interface, and implementation. Here's the interface #ifndef CARTESIAN_H #define DTIME_H using namespace std; ...
[6 replies] Last: I will take your advice! Thanks a lot, Mike (by toomanystars)
Project Euler Problem 8 code failing
 
This is the code I have for Project Euler Problem number 8, and I'm getting 16128 as a result. I calculated one section of numbers and got 18144 and that is st...
[4 replies] Last: Formatted to one line, and I was doing some testing by changing number... (by GRex2595)
by djru
Struct and error before primary expression
 
I have to create a program that reads in ID number and various grades from an external file and I have to place this information into an array. After all the i...
[6 replies] Last: That fixed it, and just for my understanding the problem was I was try... (by djru)
if statements
 
I have used if statements before so i just copied the same format for my new one but it says there is something wrong this time. If you could help me find the p...
[4 replies] Last: Thanks (by rocklover122)
how to do sleep or delay in mac Xcode 4.3.3
 
i am trying t do a delay for 60 seconds. how do i do the sleep or delay command? this is what i have: int a = 61; {cout<< "to many tries, please w...
[no replies]
Questions about random responses.
 
So I have this: string randomquestion {"question 1", "question 2"}; can I do this: randomquestion[rand() %2] if (randomquestion == "questio...
[2 replies] Last: If you are doing it that way, then there isn't really a point in using... (by firedraco)
Generating signed numbers
 
Good Afternoon, Can anyone help me to figure out why the program crashes when the show the list of the generated 1000 numbers and it doesn't output the resu...
[11 replies] Last: thank you for your help (by poloblue64)
from where do i start C++ gui
 
I wish to learn c++ gui. can anyone tell me where to start from ?
[11 replies] Last: Thanks all of you for helping me through this. I think i'll be startin... (by unkn00wn)
VS 2010 projects dissappear
 
Hello everyone! So this problem now happened to me for the fourth time. I was just writting in VS minding my own business, when an erro popped up saying someth...
[2 replies] Last: Thanks for your response and to anwser your question, no I am not on a... (by benko123)
Question about "storage"
 
I was looking at my graphing calculator and saw the "sto" button. Which stores a number value as a letter. I was wondering if there was something like this "sto...
[8 replies] Last: So I have to have different strings. Got it. Thanks. (by AandR2024)
Question about "not include"
 
I know you can do (string.find ("good") !=std::string::npos to do a include thing. But is there a way to do the oposite of it? An if it doesn't include command.
[2 replies] Last: "Include Thing" I'm interpreting this as to whether a string contains... (by closed account 3hM2Nwbp)
Running totals and functions
 
Hello, I'm fairly new at programming and currently working on an assignment. The program takes fuel usage information from the user about a series of trips. Af...
[2 replies] Last: I figured out how to get the right running total. I apparently forgot ... (by Shaikh Omar)
July 2012 Pages: 1... 3738394041... 54
  Archived months: [jun2012] [aug2012]

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