Beginners - September 2013 (Page 19)

by Karpl
Code won't give the desired output (using functions)
 
I have to write a program includes the function fallingDistance that accepts an object's falling time as an argument, then return the distance that the object h...
[5 replies] Last: @Karpl I use double type when the computing process needs a h... (by condor)
Me+string+class= clueless
 
Hi. I'm a novice to programming with 2 years of daydreaming through my programming classes and am now stuck with a unresponsive online teacher with horrible ass...
[2 replies] Last: (I would like to do...) --end print statements are already done. -... (by iM0CKusALL)
by toast9
calculates "inf" instead of number
 
Hello, I just started learning c++ in school and had to make a calculator for compound interest with monthly payments. I wrote up the whole thing and I keep get...
[6 replies] Last: ahhh! Thank you. Thats was the problem, a little math typo error. Than... (by toast9)
by aggsyb
Can you declare/initialize a bool with an if statement?
 
Instead of writing: bool test; if (test!=true){ //actions; } else{ //more actions' } Is there anyway to write it in a little more complex but more ...
[2 replies] Last: Yeh dont worry was just over thinking some ideas, have it fixed. (by aggsyb)
Enabling Others to Use Program
 
Hello (hopefully this is the correct forum for this), I was wondering if it's possible to allow someone else to run a simple program that you create. For instan...
[1 reply] : I was wondering if it's possible to allow someone else to run a simpl... (by xismn)
Opening 2 separate text files, comparing value in each one and sorting them
 
Hello, I have an assignment in which I need to open 2 .txt files, each text file The first file represents the results of test #1 while the second file rep...
[1 reply] : Seem hard for a begginer :s (by Actmad)
Compiler Error: No Matching Function
 
Upon compiling the below code, I receive this error: concordancetest.cpp: In function ‘void make_list(std::ifstream&, char*)’: concordancetest.cpp:44: erro...
[no replies]
Quadrants
 
Write your question here. Can anyone give me some suggestions on how I could edit the below code to output to the user which quadrant they are in (Northeast, S...
[no replies]
Reading from **argv
 
Hello. I'm trying to read the third string(argument) from argv one character at a time. The code below results in a warning saying that argument 1 of fgetc make...
[5 replies] Last: Thank you very much. Very exhaustive and clear answer. I understand th... (by Stremik)
Need help with lexical analyzer
 
I have assignment to write a simple lex anayzer. I can't get the output to print the tokens correctly. All that should print is the characters from a file, an...
[9 replies] Last: I solved it. //class Scan int main() { string characters; ... (by Code Oranj)
do while loop to repeat game when it is a tie - undeclared identifier error
 
Hello all. I am stuck on something I know should be really simple to fix but I just can't figure it out I've been Google-ing and gone through my text (Gaddis ...
[2 replies] Last: thank you very much! i just couldn't see it. works great now. (by summerd78)
Program that finds average of test after dropping lowest
 
Why do I get a weird number for the average after I drop the lowest test grade? // Average of test scores //Gaddis 7th edition number 3 //Libraries #include...
[1 reply] : Reset total to zero before for(int i = 1; i < numTest;i++) . And div... (by histrungalot)
confusion with logic
 
Hi.guess I should ask the question another way. If I must implement a person class.In the person class I must implement a child, teenager, grownup. I then ha...
[3 replies] Last: No problem, just letting you know. (by closed account jwkNwA7f)
Help writing simple code with dollars PLEASE
 
Please help me complete the code for this task! Thank you in advance! Write a program that reads an amount of dollars int amount . Then the program determine...
[10 replies] Last: Thank you Chrisscpp, it finally works and I understand where I went wr... (by mikey108)
by ar2007
big int to string ( system::convert )
 
hello, I have to turn a big number in a string. I tried it with sstream but the number is too large and therefore does not turn it. I would use but Xcode c...
[3 replies] Last: thx for answer mats. to_string does not work with very big numbers. 1... (by ar2007)
Why program doesn't read from text file?
 
Hello, I have a big problem. My program cant read anything from Text file. Here is my code #include <iostream> #include <string> #include <fstream> #include <i...
[4 replies] Last: Any solutions? I don't understand why when I'm trying to cout for exam... (by deividas717)
by garona
Help with a exercise (with code)
 
how do I check the value in a vector? #include <iostream> #include <cstdlib> #include <time.h> using namespace std; int verifica (int x){ ...
[7 replies] Last: To do Zhuge's suggestion, all you need to do is something like this: ... (by Mats)
Enumerations in Array
 
Could anyone please assist me in incorporating my enumerations with my arrays? I've tried putting it in, but the for-loops don't work. I put it in the "total t-...
[4 replies] Last: Alternatively, if you want to avoid the casts for( int row = RED ;... (by andywestken)
Quick guesseing game
 
#include <stdio.h> #include <stdlib.h> #include <time.h> int main () { int iSecret, iGuess; srand (time(NULL)); iSecret = rand() % 100;...
[2 replies] Last: #include <iostream> #include <cstdlib> #include <ctime> using namesp... (by Uk Marine)
overwriting << operator to read a text file.
 
I have to overwrite the operator>>. The conditions is to take in an numbers and store it into an array until the file contains a ';' from a .txt file. file ex...
[2 replies] Last: Something like this: char ch ; while( in.get(ch) ) // get the next c... (by JLBorges)
September 2013 Pages: 1... 1718192021... 64
  Archived months: [aug2013] [oct2013]

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