Beginners - April 2009 (Page 23)

i/p o/p using files
 
consider this code : #include <iostream> #include <fstream> using namespace std; int main() { ifstream file; file.open("file.txt"); if (...
[2 replies] Last: Please don't PM people to continue a thread. But isnt ifstream objec... (by Duthomhas)
Problem in calculating the area & centroid of a polygon
 
Hello readers, this is my official first post on c++ forum. I have a program in the C language that I wrote for my physics class. The problem I have with it is ...
[1 reply] : Try two things: First, print out the values of x1-x5 and y1-y5 afte... (by jsmith)
Mac Xcode - failed with exit code 1
 
Hi, I'm a beginner and I have just started using Xcode. This is my code: /*lesson 1.c: This is my first C program */ #include <stdio.h> int main() { ...
[2 replies] Last: Thanks, but even after I did that the same error message came out. (by juzbegun)
by eichar
Segmentation Fault when changing a passed string parm
 
I have code that works under SCO Unix, but gives a segmentation fault under Linux. The line of code that causes the segmentation fault is: pszStr = 0x00; S...
[4 replies] Last: Thanks for the replies. This helps. Hopefully I won't find too many ... (by eichar)
by gloeg
compile
 
well, it's a wonderfull tutorial on this site but it isn't explained how to compile can anyone explain it briefly
[3 replies] Last: which platform you are talking about? (by writetonsharma)
Some advice on my code,please
 
#include<iostream> using namespace std; class Rectangle { public: Rectangle (double,double); Rectangle (double,double,double,double); bool check_square...
[2 replies] Last: Thank you for your advice. I finally got what I wanted. (by Beginner101)
how to convert a string into int
 
Hi, well, one of the things that I have to do is prompt the user to enter a number between 0 and 10,000, but I must accept user's input as string, so I have to ...
[3 replies] Last: Also #include <boost/lexical_cast.hpp> int result = boost::le... (by jsmith)
how to delete integers from an array
 
The function should remove all the occurrences of an integer (say, removeItem) from an array. If the value does not exist or the array is empty, ,output an appr...
[2 replies] Last: Thanks firedraco, your suggestion is very helpful. Here is my ipdated... (by yingkang)
by jaydr
advice on structures
 
I am writing a program to keep track of baseball stats. I need some advice on the use of structures. i have players who can are batters then players that are pi...
[2 replies] Last: Thank you jsmith (by jaydr)
Why does this assignment not work?
 
for(i=0;i<=c;i++) { if((c%i)) factors = i; } I dont understand why this won't work? All three of the variables (factors(array), ...
[8 replies] Last: Thanks kempofighter for bringing that to my attention. Basically, i'm ... (by mcleano)
Incorrect printout from while loop
 
I am making a hangman program. It displays the word "PROGRAMMING" as all *'s and replaces a * with the correct letter if that letter is guessed. I am trying to...
[8 replies] Last: I am using Visual Studio, and I set a break point just before the whil... (by Cpluswhat)
by mdgdoc
Switch that almost works
 
Good day to all, I am attempting to construct a program that will accept input of lbs or stones in ordered to calculate the end reuslt and display that result. ...
[2 replies] Last: Thank You very much, the light in tunnels is getting bright through yo... (by mdgdoc)
C++ how to program By Paul J. Deitel, Harvey M. Deitel Edition: 6
 
Hi, if you are a beginner and are using this book then I have some pretty usefull resources for it. C++ how to program By Paul J. Deitel, Harvey M. Deitel Ed...
[1 reply] : Answer to book problems? Don't advertise for useless stuff. It se... (by eker676)
by andros
operator<<
 
Hello everybody I'm a bit confused regarding operator overloading. More specifically, I'm trying to overload the insert operator for the ofstream class so th...
[10 replies] Last: Did you change your operator<< methods to take ostreams and return ost... (by jsmith)
Class Inclusion
 
Hello, I've got a - I believe - pretty common problem but I can't figure it out. I've got two different classes which I want both to hold an instance of each...
[5 replies] Last: ok.. its working.. :) i compiled it. (by writetonsharma)
C++ Cout Result Missing
 
I'm just learning C++ going through a tutorial using Visual C++ 2008 Express Edition. My cpp file has the code below but when I run it all I get is a command wi...
[1 reply] : The entry point is main , not main3 . remove that '3' from the func... (by Bazzy)
by zydeoN
c++ irc channel/server
 
Hy, could someone say me a good irc c++ channel? I am currently in #c++(uk.quakenet.org) but its usually dead and nobody taks. I would appreciate if you gave me...
[2 replies] Last: im using windows vista (hme premium) but does it matter? Im new to c++... (by zydeoN)
by arshak
write the code, please (deleting folder)
 
Hi. I am a biginner and wanna make a program that deletes a non-empty folder (for example D:\\my folder). I have done my best, but don't have a success. I use r...
[1 reply] : Don't post twice: http://www.cplusplus.com/forum/beginner/9596/ Don't... (by Bazzy)
File Get Corrupted while manipulation of data
 
Hey Guys,, I did this coding .. but when ever i add data it doesn't save the data, and when i add second time the data it does. Even when i try to delete ...
[3 replies] Last: It looks like delete_murder() is putting a just constructed murder obj... (by Gumbercules)
Code won't work?
 
The problem I have is how to do a switch where I have to call the certain choices. int main(void) { do { cout << "Hello there ." << endl; cout ...
[3 replies] Last: if lyrics and artists are functions that take no parameters, you need ... (by Gumbercules)
April 2009 Pages: 1... 2122232425... 28
  Archived months: [mar2009] [may2009]

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