Beginners - April 2011 (Page 53)

by riayh
String Conversion help
 
Hello, Relatively new to C++ and working on a program that parses data input from a file. I have some values stored in vector<string> arrays and I have to compa...
[5 replies] Last: Are you aware that substr() extracts a substring but doesn't remove ... (by coder777)
Constructors
 
Hello, I have a question about constructors. I've stumbled upon a piece of code that I don't quite understand. Here's the code: class cls { ...
[3 replies] Last: Thanks JoR and Xander314 for your replies. The problem is solved :) (by Daniel88)
by Sieves
Dunno what to do from here
 
So i'm trying to test my class so i can start writing the driver and have faith that the it will all work but i am running into this incredibly frustrating erro...
[4 replies] Last: From Mathhead200 - FYI: all files that don't have a main function ... (by Alrededor)
Deleting part of a structured array?
 
Yep! Asking about my game again haha. Anyways. There's a part in the game when you're in the battle system, that you can use an item if you'd like (Potions), I ...
[13 replies] Last: you could always have a check if the number of items left is equal to ... (by Zap)
by mozly
deep copying
 
I'm having a problem with copying vectors. So I have this vector of objects call it std:: vector<parent*> first_vector . parent is the base class. The problem ...
[6 replies] Last: I'm unsure of who needs to befriend who? (by mozly)
by Sieves
string question
 
I want to insert a series of characters into a string... These characters are stored in a multidimensional array and are not necessarily known. I am trying to d...
[4 replies] Last: granted there are all sorts of other things wrong with this lol (by Sieves)
Complete beginner desperately needs to get audio app working!!!
 
Hi all, First post here at C++.com. I joined because I'm having trouble getting a uni project app working. Essentially, it's a batch audio (.wav) normalizer ...
[5 replies] Last: Read the book c++, how to program. That's the one i'm fallowing. But i... (by isenhart)
by Sieves
elements from array to string
 
i have a multidimensional array of character type numbers separated by X's i want to go through the array and store each group of numbers in between the X's as ...
[1 reply] : now i am trying this for(i=0;i<G.getHeight();i++) { for(j=0;j<G.ge... (by Sieves)
Need Help With Arrays and Files
 
I need to write a program that can read in a maximum of 100 numbers from a text document. I also have to show how many numbers were in the text document.I was t...
[2 replies] Last: #include <iostream> #include <fstream> using namespace std; in... (by Mathhead200)
Help with I/O Stream
 
EDIT: I've got it to read all the text in the file, now I'm trying to replace specific characters with a new character and have it print each line. How can I ch...
[1 reply] : in_stream.open("blankCrossNumber.txt"); char output; //instead of ... (by Mathhead200)
by Sieves
storing integers as characters
 
so i am generating a random number and i want to store that random number as the character of itself... i don't know how to do this. char t; (unsigned (t...
[4 replies] Last: '0' == 48 == 48 + 0 == '0' + 0 '1' == 49 == 48 + 1 == '0... (by Mathhead200)
fmax array to find max number
 
Hey, all. I'm just stuck on this problem. It basically asks us to use an array named fmax that takes in 10 integers inputted from the user and find the maximum ...
[4 replies] Last: ^Ah. Mathhead got it right, you were writing out of bounds of the arra... (by firedraco)
How to display cstrings?
 
#include <iostream> #include <string> #include <sstream> #include <cstring> #include <iomanip> using namespace std; class player { private: char Firstna...
[5 replies] Last: @hunkeenlin : i think you should consults this code ! #include <iostr... (by Conan)
Stuck on a C++ problem
 
Freeeee
[2 replies] Last: I would suggest (for the ability to use this in future classes that ha... (by ciphermagi)
While Loop: invalid data does not loop out..and request a new integer.
 
Hello all, Sorry for the newbie post but I am trying to complete an assignment. My code does for the most part what the assignment asks. My code should co...
[2 replies] Last: Thank you so very much for your help on this.. I have been reading and... (by jennirey)
Need help with getline
 
So I am trying to take data from a file, and read it into my program using getline; however, when I try to compile I get this error message : Person_Directo...
[1 reply] : //line 28 ... getline (in, type) ... // getline stores into a str... (by Mathhead200)
Frequency Analysis Question
 
My program has 4 options, the first asks for a user specified input file name, the second stores the letters in that file into an array. The third part analyzes...
[6 replies] Last: comparisons between the float array(sorry) and the frequencies of the ... (by WalterxxRobles)
Displaying in class functions
 
#include <iostream> #include <string> #include <sstream> #include <cstring> #include <iomanip> using namespace std; class player { private: char Firstnam...
[12 replies] Last: No! You still use the getFname function. You just need to define it... (by Mathhead200)
=& operator overloading
 
Hi all, how do I overload =& operators? I want to be able to do this: type1 a = 1; type1 b; b = &a; type1 is a class, so what I basically woul...
[3 replies] Last: thanks both of you:) I think I now get it. (by Yours3lf)
by kcbob
sorting values
 
hello world im having trouble sorting some values i got the inches to be sorted and now i need to sort the dates to go with that value if the input is:...
[1 reply] : Try this one, find changes yourself. #include <iostream> #include <c... (by madredcake)
April 2011 Pages: 1... 5152535455
  Archived months: [mar2011] [may2011]

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