Beginners - March 2013 (Page 73)

HomeWork Help Please!
 
So, here is the question: Problem 3: Coloured tickets The student council in your school wants to organize a charity breakfast, and since older student...
[1 reply] : Try working it out on paper with an example. Assume the amount to be... (by AbstractionAnon)
Need Some Help; Comparing Array?
 
Writing code to determine how correct a student was on a True/False test... I can't for the life of me figure out how to compare the two char arrays and come up...
[7 replies] Last: Ahh, I checked everything but my answersCorrect variable type. So much... (by oobilator)
Why 'int' main()?
 
... I'm not exactly sure why I'm being forced to return an int of 4 bytes when I could manage with a short int (2 bytes) or heck a char (1 byte). Could some...
[1 reply] : Because the standard says so. http://www.open-std.org/jtc1/sc22/wg21/... (by AbstractionAnon)
Finding positions of specific numbers in an input stream
 
The goal of the program is to ask the user for a number. This number determines the amount of input values that follow. The program then allows the specific c...
[no replies]
Help with c++ homework?
 
Hello, so when working on this problem, I should be able to enter 'q' or 'Q' to finish entering characters, but it only stops after I enter 'Q'. I thought I di...
[6 replies] Last: Take a look into http://www.cplusplus.com/doc/tutorial/variables/ S... (by closed account 3CXz8vqX)
slight issue with a greatest common divisor calculator
 
Hello everyone. Someone gave me the following program that calculates the greatest common divisor of two positive whole numbers (posted below). I understand w...
[9 replies] Last: Not exactly. The compiler allocates a particular memory location to ho... (by Chervil)
Forbids comparison between pointer and integer
 
Hello everyone! I've been working on some basic code which is supposed to have multiple ( simple to start with) math problems that must be answered, and depe...
[6 replies] Last: I see, guess I need to read up a bit more on the subject. Thanks for ... (by StevetheHunter)
How to produce non repeating numbers with srand
 
how do i make srand not repeat numbers? here is my code #include <stdio.h> #include <stdlib.h> #include <time.h> int main() { printf("This program asks t...
[1 reply] : You can't force rand() to produce (or not produce) a certain number - ... (by jim80y)
Do while scoop error
 
I always forget how to do this the correct way, and always end up whith the same error. Its a simple problem, and I'm sure the solution is very obvious. i...
[2 replies] Last: Thank you iHutch105 (by Hashimatsu)
How do you make this end
 
I need it so that when you enter q or Q that it ends the program.How do I do that? please add it to my code.Thanks! #include <cstdlib> #include <iostream> #i...
[4 replies] Last: I'll make some explicit suggestions when you edit your post to use cod... (by AbstractionAnon)
by Amaiha
Movie Data and Structures
 
I'm getting some error saying I need an initializer before the " . " , what do I do? /* #include<iostream> #include<cstring> #include<stdlib.h> #d...
[4 replies] Last: Yeah, drop the part in the brackets in your struct declaration too. ... (by hanst99)
Movie records with arrays program help!
 
Make a movie_record struct, and then make an array of movie_record structs. (How?????????????????) After I setup your array of movie records, then write a f...
[4 replies] Last: Okay got that to work. Now how would I create a function set_movies(),... (by bruntmjust)
by lmsmi1
Compiles fine, but doesn't return correctly?
 
My program below is supposed to output a randomized string of letters, capitol and lower case at random order. It compiles fine, but doesn't cout the pass s...
[1 reply] : You'll want rand()%26 (26%26 == 0, so with 25 you wouldn't get the '... (by hanst99)
by Warik
while (inFile) loop won't terminate
 
Hi there, I have written a program with a "while (inFile)" loop that won't terminate. Relevant code below: int main() { ifstream inFile; ofstream outFile;...
[no replies]
C++ on a Windows, school computer.
 
Before you read, I'm on Mac, and the program is text-oriented. I am working on a calculator with a ton of different things. I showed it to my math teacher an...
[no replies]
basic question about getting input
 
I can't understand why the code segment below isn't working properly. After I input a price (say 18.70), the program outputs "What is the name of this product?...
[2 replies] Last: I'm using getline because the input might have spaces in it (I might w... (by strangelove1221)
Functions Problem
 
Hi, I'm getting the following errors and I don't know what they mean. Error 1 error LNK2019: unresolved external symbol "double __cdecl CelciusToFahrenheit(do...
[2 replies] Last: OK so it runs now but when I choose a single value I get an infinite l... (by FaffyWaffle)
by CMa2
Matrices (NxM) Multiplication
 
Hello everyone, I would need to write a c++ program that takes a matrix from the console, trasposes it, and then calculates the product of the two. I managed to...
[2 replies] Last: hahahahaah nice one for the TRANSPOSED ;)! Thank you, now I understood... (by CMa2)
How do you make this loop until its right
 
figured it out
[2 replies] Last: where? i put it in and it keeps change the numbers so its not the same... (by geraldfe)
Really need some help making a menu
 
figured it out
[5 replies] Last: i need it to loop until they answer it correctly (by geraldfe)
March 2013 Pages: 1... 7172737475... 87
  Archived months: [feb2013] [apr2013]

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