Beginners - February 2011 (Page 28)

string size / lenght problem
 
Hello, i have problem with size() function. Whenever i want to count how many characters have string i typed from console, i got wrong value. The problem is...
[3 replies] Last: Thanks! (by capeone)
by tonnot
Gettting the string form iterator to be written to an ascii file
 
I have a list<string>. Using the iterator I can get *i. Now I want to use the string 'pointed' how ? I dont want to use cout to console I want to do my_str...
[3 replies] Last: http://www.cplusplus.com/reference/iostream/ostream/put/ ofstream.p... (by filipe)
by tonnot
What is the meaning of ^
 
I have see some code with ^character... What it is for ? (maybe it was a basic c++ question....) Thanks
[5 replies] Last: Ok ! Thanks (by tonnot)
Unable to delete in release build
 
Hi. I'm having problems deleting. I have this variable declared: char* unparsedData = new char ; When I delete the variable using: delete unpars...
[3 replies] Last: Are you absolutely sure every time that m_pUnparsedData has the same... (by Moschops)
simple saving to a text
 
i want to be able to choose what the file name that i can save to. heres the code // basic file operations #include <iostream> #include <fstream> #include...
[5 replies] Last: thanks alot :), can you just quickly explain what the "c.str()" does ... (by thecrrrg)
.eof is not terminating loop
 
I can't get the .eof() function to work. It seems that it will not break the loop. It tries to read after end of file and crashes due to arbitrary values. w...
[4 replies] Last: Yes, you've got it. File operations are typically abstracted away i... (by Duthomhas)
Need advise on my looping!
 
Need advise on my looping end part needs some work and I need anyones advise. #include <iostream> #include <string> using namespace std; void drink...
[7 replies] Last: Correction... don't EVER use goto... there is absolutely NO reason yo... (by closed account z05DSL3A)
bus error (core dump)
 
hi i am writing a program and i got bus error. im doing as much research about it as i can i really am confused about how to go about this. basically my project...
[1 reply] : It looks like you are using un-initialised variables, for example in s... (by closed account z05DSL3A)
by tonnot
How to extend class to internal class?
 
I have the next structure class SUPER { class class1 {} class class2 {} class class3 {} } I want to get inheritance for class3 from c...
[1 reply] : class SUPER { class class1 {} // <-- Missing the semicolon. ... (by closed account zb0S216C)
by p4neng
Rejects duplication
 
Hello everyone i need help for an assignment for our prog class.. We were assigned to make an employee log sheet that records employee numbers, employee name...
[9 replies] Last: What's going on with your code? I see memory allocation, Pointers and ... (by closed account zb0S216C)
Do-while loop ends
 
My do-while loop ends my program. I know I'm probably doing something wrong, I'm a newb. #include <cstdlib> #include <iostream> #include <ctime> us...
[5 replies] Last: [quote=plantking6]I plan to get an actual book soon. I would recommend... (by closed account z05DSL3A)
got to write a yahtzee program
 
ok so today in class i was given the instructions to write a program that allows you to play yahtzee. must calculate scores on its own. so far i got // yaht...
[1 reply] : Many things to improve here, but th one you need is that line 59 happe... (by hamsterman)
by ogward
couple of problems
 
Hi! I've been working on this assignment i have whole day and I'm a bit stuck now... 1.this is my function so i can remove a player from the array(array i...
[1 reply] : 1. Players goes out of bounds. The last element is Players[nrOfPlayer... (by hamsterman)
by Smitty
C++ Related Excerise
 
I'm new to C++ and I'm currently taking a class. My instructor gave me an exercise to do with I don't understand. The exercise is as follows: Develop an algo...
[2 replies] Last: Ok. I'll start writing some code now. (by Smitty)
Printf/printing to files
 
So, I am trying to learn about how to save, open, close, write to, and append/add to files. I believe that this can be done by using printf, but I'm not sure. ...
[1 reply] : If you are using C++, use fstreams. http://cplusplus.com/reference/io... (by Zhuge)
by Roblox
Best way to learn C++ fast?
 
Hi, I'm new to C++. I have been studying other languages and have decided to challenge myself and study this language. I LOVE this tutorial website! Does any...
[1 reply] : Learn & Code. Books: C++ primer by Lippman Thinking in C++ by B... (by anonymouscoder6)
Can't get my program to work correctly
 
i am in a beginners c++ class and we are on our second program. I have been working on it for two weeks (remember I'm brand spanking new at all this) and my pro...
[6 replies] Last: YAY I GOT IT TO WORK!! THANK YOU SOO MUCH!!! (by newbie09)
If statements and Simple Pos. Int output?
 
First off, would like to say I am a fresh noob at this. Class started last friday, and already I am eager to keep learning. Anyhow I was bored and started to w...
[9 replies] Last: anonymouscoder, the system("PAUSE"); i was only using since my IDE aut... (by Coupee36)
How to output final balance for checkbook program
 
Hello, This program is for a class assignment. I know the rules say that you won't tell me exactly what to do, but hints would be helpful, too. I am very new...
[6 replies] Last: Using goto is not a good idea. Use loops, a while or do-while loop wi... (by king214)
Classes, functions, set/get, oh my!
 
I'm very new to programming still and have an assignment for a distance education class of mine that I'm not grasping very well. I'm supposed to create a class ...
[1 reply] : Looks really good but think of classes as containers for encapsulating... (by closed account 3pj6b7Xj)
February 2011 Pages: 1... 2627282930... 43
  Archived months: [jan2011] [mar2011]

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