Beginners - April 2014 (Page 33)

Function parameters
 
Hi, I am working on implementing this piece of code right now and I don't understand why I am having errors on line 12 and 14. It says that both length and arr...
[1 reply] : They are not stable_sort function parameters. They are parameters of t... (by JockX)
Taking in input from a textfile and printing it out
 
My computer science teacher wants us to take in input from a textfile that displays rain from a city and a city name, then add together the rain from each city ...
[5 replies] Last: oh okay, so how can I fix this problem I'm having? (by liquifiednate)
by SVcpp
Help me with my loops and code!
 
Hello, I'm tryin to get my code to convert my user input to upper case, while removing any extra stuff they might put in after the 'y' in 'yes.' I'm also try...
[3 replies] Last: Oh. I read code completely. char response = 'i'; /*...*/ char respo... (by MiiNiPaa)
Returning a new object
 
The purpose of the below function is to copy the information of the caller, and the information of the object on the Right Hand Side. Then return a combination ...
[2 replies] Last: Problem solved. Thank you. (by JRimmer)
Timing a Loop
 
So I had to modify a program so that the loop is timed and it's printed out. But I don't get the right timing on the clock. What's wrong?? 1st is an h file, 2...
[2 replies] Last: Thanks! It worked! The buildDuration function was supposed to return a... (by Gawaine)
Sorting objects
 
Hi , The code which i have written is to read the data from a file to the class objects bikes. Now my problem is , how can i sort them. Its like i want to sort ...
[8 replies] Last: Thank you Very much Sir. I Got it! (by hiddenx)
Vectors
 
How and why is vector used?
[2 replies] Last: Thank you. (by Stephanie16)
Does not compile :(
 
My this program works fine on visual studio 2013, but does not compile on Code::Blocks 13.12 and Dev C++ latest version #include <iostream> #include <con...
[11 replies] Last: I was not including #include <stdlib.h> in my code, but now it is wo... (by ButchCavendish)
calories strings
 
what is stopping my strings from running [#include <iostream> #include <string> using namespace std; /* Input: the miles run, the calories/mile, and the ...
[1 reply] : This is not valid code. Also, main must return int . (by LB)
writing to a 2-D array from an infile
 
i need to take info from a file, then put it into an array. my whole program is complete except the actual storage part. // function getdata draws data from...
[1 reply] : if you need anymore info, please tell me. i've been searching the web ... (by nbanney)
Error compiling C++ code...
 
So, I am using Windows Visual C++ 2008 edition, and I am having a rather lot of problems with it. Every time I compile my code, it comes up with this error: "...
[2 replies] Last: Thank you, so much! :) (by Trinthetweety)
Text analyzer not generating the correct results.
 
Greetings. I'm trying to make a simple program that takes a string, counts how many times each character appears and gives a percentage compared to the total. I...
[2 replies] Last: I think I get what you're saying. Because I'm comparing the array to a... (by drmaniac)
by iluv41
compile errors, cannot figure out
 
nevermind
[4 replies] Last: http://www.cplusplus.com/forum/general/113904/ compare bool FindMatc... (by ne555)
by klay2
Need help with game
 
the @ symbol shouldn't leave a trail but it does #include <iostream> #include <windows.h> using namespace std; char map ; class Player { pu...
[3 replies] Last: You're welcome. I hope you'll see why that worked. At its old location... (by closed account D80DSL3A)
always get ascii instead of numbers
 
As the title says i'm trying to get my code to tell me how many characters are in my string. It comes back and shows a symbol. Its always the same symbol for ex...
[2 replies] Last: Hey LB, Thanks for your reply. I had phraselength as a string instead... (by MRangel)
Converting chars to decimals and vice versa
 
I'm converting numbers and am confused..My first if works fine.. If i type in A I get back : 10 if i type in B I get back : 11 if i type in C i get back: 12 e...
[1 reply] : What were you trying to do on line 22? By the way, the C++ standard d... (by LB)
Array search bug
 
Hi, I'm having a bug that's driving me crazy, been trying to fix it for hours... My program asks for numbers and places them in a 2D array. Then it asks...
[1 reply] : while (!OK && /*...*/){ //... while (!OK && /*...*/){ ... (by helios)
passing value to array
 
I am writing a program for a poker game.. I created a class to get cards and create deck.. the problem I am having now is how to deal 5 cards to an array to ve ...
[no replies]
by vinnyo
I need HELP!
 
This assignment is due today and I am just stumped on where I should even begin with it, any help would be appreciated. The program asks a user to enter a nu...
[14 replies] Last: Wow LB, i've never seen anything like that. Thanks for posting. (by closed account 2UD8vCM9)
Functions / Text Input / Calculations / Text Output
 
I'm in my first C++ class and just got an assignment. One thing I have major trouble understanding is how to use a function to read text and how to use a funct...
[no replies]
April 2014 Pages: 1... 3132333435... 67
  Archived months: [mar2014] [may2014]

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