Beginners - November 2014 (Page 54)

Finding number of substrings in string
 
I'm trying to understand the basic logic of this loop, my book (jumping into c++) just got into methods and the stl at page 210 so bear with me please: strin...
[3 replies] Last: You are correct, but the code isn't stepping past "cat", it's only st... (by d1ff1cul1010)
How do I open a file in one routine and close it in a separate routine or is this forbidden?
 
Unfortunately I have many years of experience with structural programming and the lessons I have learned over the years do not translate well to object oriented...
[5 replies] Last: As we all know using '&' to pass by reference in a function/call arran... (by closed account 48T7M4Gy)
Question On fin.get()
 
Just trying to confirm if I correctly understand this function. So based on how the code below each time fin.get() is called, the next character on the file ...
[1 reply] : Your understanding seems correct. (by jlb)
Problem outputting a fraction instead of a decimal
 
I am writing a program that takes from the user 2 numbers to represent the numerator and the denominator of a fraction, and it will then check if any of the num...
[1 reply] : Maybe what I wrote in this thread might help. http://www.cplusplus.co... (by closed account 48T7M4Gy)
Converting program to use arrays
 
Hi, I have a program that reads data from an input file, uses 3 nested loops, and writes the data to an output file. It stores 3 students personal info, and 5 ...
[11 replies] Last: Well, i just decided that it wasn't possible and did it this way to ge... (by forbesthebrit)
by Akigou
Uninitialized Variables ( Phone bill program )
 
I'm trying to call a function into another function but It keeps giving me that the two variables I have in in the "read_and_total" function I'm tring to call i...
[3 replies] Last: It's not clear to me which function you are calling so I can only gues... (by closed account 48T7M4Gy)
Why doesnt my code simplify fractions properly?
 
It always reduced fractions with the denominator or numerator having a 0, where it shouldnt. Thank You for your help #include <iostream> using namespace s...
[1 reply] : #include <iostream> using namespace std; void add(int, int, int, int... (by closed account 48T7M4Gy)
Function finds all prime numbers between two user inputted numbers
 
I've been stuck on this problem for awhile now. Can someone help me out? http://gyazo.com/34082be87f7c655d562b02ea5ad7bc0c And this is my code. I feel lik...
[1 reply] : I made a couple of changes to your code. I used a void function instea... (by druid84)
Making a Tower of Hanoi problem that displays each step visually.
 
I've been stuck for a couple days now on this assignment. I just need a couple pointers of where I need to go next, so if you could help, it'd be greatly apprec...
[no replies]
infile?
 
can anyone explain to me what it wants me to do im really confused. sorry for my lack of understanding Processing Text Files Sequentially File: An area in s...
[2 replies] Last: thanks bro (by poseidn)
by NOD32
Problem with function returning correct value
 
Confused here, what is wrong with my syntax? #include <iostream> #include <cmath> using namespace std; double fallingDistance(double time) { ...
[2 replies] Last: thanks (by NOD32)
Help with homework problem
 
The chess club of a high school is electing new president. Three club members are running: Andy, Brianna and Chuck. Write a program to do the following. Ask ...
[2 replies] Last: -BEGIN -declare variables for A,B and C -while(input is not E) if(A)... (by shadowCODE)
Copying CString between whitespaces
 
Hey there. I've been taking a C++ course for a few weeks now and I'm trying to understand a little bit more about how CString works. Suppose we take a Cst...
[4 replies] Last: Thanks! I see my mistake now. And I wasn't being sarcastic on my previ... (by druid84)
Why Wont My Functions Process The New Values?
 
Hi all, So I was given an assignment where I have to input two points (four integers) on a Cartesian plane from a file and then process it using functions. M...
[3 replies] Last: That's a good point about the sequential data. So use something like t... (by closed account 48T7M4Gy)
by clodi
vectors out of range
 
hello, let's say that I have this vector: vector hello < int >; then I go.. hello.push_back(); a couple of times. How can I write a piece of code ...
[2 replies] Last: Thanks! but that's what I am currently using and it still won't say w... (by clodi)
Input data into an array from file
 
I'm attempting to initialize an array from a list of numbers in a data file that looks similar to this: 1 4 7 12 ... 96 There are 28 total numbers in th...
[4 replies] Last: shadow you are the man! who knew it would be something so simple. Tha... (by hman0305)
offset meaning
 
I'm reading an e-book about C++ and found something i didn't understand. When speaking of something like this: char* ptr = &charArray ; What does an off...
[6 replies] Last: I think i get it now, thanks :) (by srscode)
VS2013 issue, been going at this for awhile now
 
So I am reaching how to you guys in hopes of a solution to his problem I have been having. I am using Visual Studio 2013 and I am trying to use the FBX SDK ...
[4 replies] Last: Well I finally figured out what was going on. This was a project that ... (by Hambone)
by koko82
Linked List Mayhem!
 
Hi All Just learning about linked list and doing some excersises feel like I have hit a brick wall. There are two things one is when you self reference withi...
[2 replies] Last: Hi heres the full code #include <iostream> using namespace std; s... (by koko82)
Hashing/ Linear Probing
 
My code is supposed to hash data from a file into an array and then implement linear probing with additional data from another file. The first part works, but ...
[no replies]
November 2014 Pages: 1... 5253545556... 65
  Archived months: [oct2014] [dec2014]

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