Beginners - May 2010 (Page 11)

substring position variable causing crash
 
while(!flive.eof()) { getline(flive,slive); pos = slive.find(" "); reclive = slive.substr(pos); slive.erase(pos); keylive = slive; backup...
[12 replies] Last: That's actually part of the assignment, but for now I just wanted to m... (by Scythe37)
by Nevo
Dinamic array
 
Hello everyone, i have problems with this: I want then the user enter a number of words, and they will be save in a dinamic array... here is the code: c...
[18 replies] Last: Yeah i love the C++ strings jeje, first i do it with c++ strings, but ... (by Nevo)
by Delpee
Why the 'f' in de value of a float?
 
Hi there Forum, Today I started working with SFML ( http://www.sfml-dev.org/ ) for a little school project I'm doing. I was reading the graphics tutorials wh...
[3 replies] Last: Okay, I get it now :-D. Thanks for the quick response! (by Delpee)
by shirin
composition
 
Write a C++ program that will find out the total amount of a customer's bill according to the items he or she has purchased. Create two classes: Purchased...
[4 replies] Last: The plot continues in his double post >> http://cplusplus.com/forum/ge... (by cnoeval)
Correctly matching function constructor calls
 
I've been working on a database program using classes. Its the most complex C++ program I've made so far and I keep finding one particular error turning up in m...
[2 replies] Last: Of course. Thank you so much. Thank you for not pointing out how big ... (by magicmasterp)
window closing
 
I am using microsoft visual c++ and when I compile it, the window closes and I cant tell if it worked or not. Can someone tell me how to stop it from doing that...
[12 replies] Last: I said it in such cases that code should be removed for release... ... (by DemienBjarne)
Adding variables with equations
 
hi, i'm trying to receive this equations in the output with the sum: The sum of 3a+9b+10c-8d=6 9a-2b+3c-4d=4 12a+7b+13c-12d=10 i would appreciate any sugge...
[4 replies] Last: What is sum supposed to be for? And why don't you just output "12a+7b... (by Athar)
While loops and arrays
 
Hello, I was going through a beginner's guide book on C++ and could not understand exactly how this example works, even after pondering for hours. This prog...
[11 replies] Last: Thanks so much. Have a nice day. (by mucygni)
function declaration with string argument does not work in header file
 
Hi guys, Could you please help me with one beginner problem ? How I can declare function with string argument in header file. I created this code but comp...
[3 replies] Last: Read this: http://cplusplus.com/forum/beginner/23859/ (by moorecm)
trying to printout the sum and difference
 
hi,i'm trying to get the sum and difference of two equations inputted by the keybroad in this program i appreciate suggestions how to correct the syntax errors ...
[1 reply] : Some lines of code must be missing. The error says that it is at line ... (by RedX)
Counters and Functions
 
Is it better to a) declare a new counter in every function that needs one. b) parse an existing counter in main() as an argument into each function. c) declare ...
[5 replies] Last: Ok. Thanks for the quick replies. (by ServIce)
access array from gcnew?
 
Background: I've been reading through some c++ tutorials, and I decided to try make a program to edit certain bytes of a file based off of user input. Up unti...
[1 reply] : Supply the code for StreamReader! (by DemienBjarne)
Button/mouse movement
 
Hey again everyone, i wonder if there is a way to move the mouse via code to a certain position on the screen and then make it so that it presses mouse button n...
[2 replies] Last: Ah ok, if i may just shoot in another direction saving the hyperlink o... (by Melander)
Modification through pointer fails
 
Hi,all. Please read my code which is quite simple. #include <iostream> using namespace std; void st(char* q) { *q = 'x'; //the problem goes here cout<...
[2 replies] Last: Gotcha ,many thanks! (by sysabod)
About Dev-C++
 
Every time I run my codes to show the output(using command prompt), it only shows for about half a second on the screen. I've done some research about this prob...
[8 replies] Last: But then again, as is explained in the stickied thread here in the beg... (by AngelHoof)
Average function
 
Hello. Pls let me know Is there an average function in C++ library or I must code by myself?
[1 reply] : I use std::accamulate and then result of this function I devide by cou... (by Denis)
vector<class> problem
 
Hello, I'm having a problem with storing classes in a vector. I'm for now just using a simple windows program to which I added this struct: struct STEST ...
[7 replies] Last: @guestgulkan exactly , when you create a vector contains class(or... (by sysabod)
by amaac
Finding Error Passing Classes around
 
Ok i have just started using classes and headers in programs and this is the first pass at it. I am getting an error code that does not give me any hint to the...
[14 replies] Last: SOLVED!!! Thankyou everyone.. here was my problem. I have reader u... (by amaac)
Need to read from a txt file into structure, very confused.
 
Ok so I need to read a bunch of information from a text file and put it into a list of variables in a structure. I have a list of 6 students, each with their...
[7 replies] Last: read them in one as a time through that loop a getline for each. you ... (by amaac)
Template Classes
 
I have a node class defined as this: #include "Node.h" template <class T>Node<T>::Node(void) { cout << "Node created with default value\n"; _val = 0...
[13 replies] Last: For output I was seeing only the last CustomClass object that I added ... (by closed account Lv0f92yv)
May 2010 Pages: 1... 910111213... 33
  Archived months: [apr2010] [jun2010]

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