Beginners - April 2013 (Page 44)

while loop to read to EOF
I am trying to read a file into an array that has a students name followed by their grade. Example of the input file: Bob 99.5 Kim 87.3 Jack 94.8 Kyle 98.5 ect...
Apr 15, 2013 at 6:14pm
[9 replies] Last: FYI, I fixed a couple mistakes in my snippet. (Missing parenthesis an... (by moorecm)
Adding to Vectors
In the area of vectors, I'm able to reserve() and then push_back just fine, but I thought just push_back would automatically increase the capacity. Whenever I j...
Apr 15, 2013 at 6:09pm
[3 replies] Last: You shouldn't need to be concerned about capacity unless you have inte... (by LB)
by buckgb
Help - builds, runs but crashes out at strcat
Hello all, my first post ::) ??? I am running through some basic tutorials on C, using Code::Blocks. Can anyone help me out with the following code, with...
Apr 15, 2013 at 6:07pm
[2 replies] Last: Thanks Chervil. You were spot on with the blank pointer allocated len... (by buckgb)
Vector of vectors, how to find size?
How would I edit this to show the size of the inner vector? (Not sure if that is technically correct. Please correct me if it's not) #include <iostream> #inc...
Apr 15, 2013 at 6:05pm
[17 replies] Last: Oh ok now I understand. And sorry if I sounded rude I just don't real... (by closed account 3qX21hU5)
Object Oriented Vectors
I am confused with how to use vectors in classes. For example if I have this header file class vectorsoo{ public: void addNumber(int); // adds nu...
Apr 15, 2013 at 5:08pm
[3 replies] Last: Nevermind I figured it out. Booradley60 you were right, I didn't reali... (by ADTR2012)
a very simple complex number question for you please
Guys, I have a very simple question for you, Please help me. Thanks alot!!! #include < iostream> #include < complex> using namespace std; int main...
Apr 15, 2013 at 5:02pm
[2 replies] Last: Hey, mutexe. I think I got it. Thanks!! (by sunson43)
by AprilC
Strings from file
Hey guys I've been all sorts of methods on trying to find particular strings from a file that has thousands of strings. Im searching for palindromes, I have a c...
Apr 15, 2013 at 4:58pm
[3 replies] Last: Is your .txt file in this sort? Hi there this is a txt file ... (by greenleaf800073)
Phone Number List issues
Ok, So technically this program works. My problem is my error message is also displayed when I print the information. Can someone help me figure out how to prev...
Apr 15, 2013 at 4:53pm
[3 replies] Last: Well, ex. It finds matches but there is nothing to tell the program th... (by greenleaf800073)
by ND04
I Need Help With Implementing A Function To Find The Intersection Of Two Set Using Pointers.
This Is The Code I Made To Find The Union Of Both Set, But I'm Kinda Lost About Coding The Function To Find The Intersection Of A|B By Modifying The Function AU...
Apr 15, 2013 at 4:49pm
[2 replies] Last: So, you're trying to find all the elements of A that are also in B, ri... (by MikeyBoy)
Help with random number generator
I am trying to have a program that generates numbers between 1 and 9 and wont repeat any numbers. This is the error I keep getting D:\Programming\C++ sid...
Apr 15, 2013 at 4:26pm
[3 replies] Last: #include <algorithm> #include <random> #include <ctime> #include <ios... (by JLBorges)
question
Write your question what is the difference between function overriding and virtual function?why we are virtual function? can u explain it pls.....
Apr 15, 2013 at 3:48pm
[1 reply] : A virtual function is one which will call the most derived override of... (by LB)
How to flush all?
I'm not quite sure what to do here. This is code for a Simon style game, and while currently pretty functional (and with GUI pending) I can't get the entire seq...
Apr 15, 2013 at 3:08pm
[2 replies] Last: If you're trying to clear the screen like Peter87 suggests then sinc... (by Computergeek01)
by Omeyer
For loop to determine a range?
Guys, I thought I had a solution figured out for an assignment, but finally after getting word back from my instructor, it is incorrect. Basically, I am ...
Apr 15, 2013 at 3:07pm
[11 replies] Last: Use a lookup table, perhaps? Something like this: #include <iostream... (by JLBorges)
"COUT" doesn't work for "char *"!!!
HI! I wrote this program, it is not complete now. But let me know if you know!!! THNX! #include <cstdlib> #include <time.h> #include <iostream> #includ...
Apr 15, 2013 at 2:24pm
[5 replies] Last: @Ardeshir81 Perhaps it's because you are assigning all of the elemen... (by closed account D80DSL3A)
Simple Function
I want to know what's wrong here why the result appear like that ? #include <iostream> using namespace std ; double GravitionalForce (double , double , d...
Apr 15, 2013 at 2:02pm
[8 replies] Last: all what I wanted is just to output all of the result just like your o... (by PureEvil75)
Array input unusual loop
The problem I have is that when entering the same number for the 20 arrays then it loops unexpectedly asking for input, e.g. if I enter all 5's then it asks for...
Apr 15, 2013 at 1:33pm
[11 replies] Last: Did you get rid of all the extra loops? Could probably do the whole th... (by TheIdeasMan)
Input Problem
How would I handle an input like this in C++: The input begins with a single positive integer on a line by itself indicating the number of cases, each describ...
Apr 15, 2013 at 1:32pm
[1 reply] : Use a variable to hold the blank lines. cin >> cases; cin >> throwAw... (by closed account 3qX21hU5)
by kw1991
can't find problem with code
when i try build my program i get this error: fatal error C1075: end of file found before the left brace '{' i know it means i'm missing a bracket somewher...
Apr 15, 2013 at 1:31pm
[13 replies] Last: those are the # defines. your code is actually doing this: main() { ... (by writetonsharma)
by Larry2
.end() question
Hello, I am learning the iterators but cannot afford to understand something simple. Here is the official code : // vector::begin/end #include <iost...
Apr 15, 2013 at 1:11pm
[9 replies] Last: Got it !!! Many thanks JL ! Larry (by Larry2)
For some reason i get ahuge - number idk whats wrong
#include<iostream> #include<string> #include<cstdlib> #include<ctime> using namespace std; int main(){ int results ; int max = 5; int holder = 0...
Apr 15, 2013 at 12:40pm
[5 replies] Last: and its working now no, it isn't You are wrong. He defined the ar... (by coder777)
April 2013 Pages: 1... 4243444546... 83
  Archived months: [mar2013] [may2013]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.