Beginners - July 2009 (Page 18)

loop and filestreams problem
 
line 47 is the line true?.this program get endless loop.sorry my english #include <cstdlib> #include <iostream> #include <fstream> using namespace std...
[5 replies] Last: i'm sleeping now and please i hope you are solve my problem tomarrow.a... (by areyoupp)
Why transform doesn't know the argument passed to an overloaded function?
 
I'm using Koenig/Moo's Accelerated C++, chapter 7, "Using library algorithms", in particular, the transform algorithm. Using the book's examples, there are s...
[5 replies] Last: Then, are the following conclusions correct: 1. If a function is no... (by therefore)
copy w/ back_inserter vs. container<T> c(b,e)
 
I'm using Koenig/Moo's Accelerated C++, chapter 6, "Using library algorithms". This is invalid code: vector<int> u(10, 100); vector<int> v; copy(u.begin()...
[3 replies] Last: The copy constructor is the fastest (others may or may not be as fast;... (by jsmith)
Finding if a pointer is null
 
Hi all, I have a simple question here. How can I understand if a pointer points to something, or is just initialized ? I tested the following code : ...
[7 replies] Last: Thank you guys. :) Best regards (by cppuser)
How would these options in my C++ program be done via an array of structs?
 
#include <iostream> using namespace std; //include protype functions int main() { char choice; bool terminate = false; while (!terminate) ...
[2 replies] Last: Sorry. #include <iostream> using namespace std; //include prot... (by steinzfan)
by Rikazu
Yet another fail
 
Fixed a bunch of typos, and every single time I look at o-, my mind sees it backwords. lmao Works now. Thanks again.
[1 reply] : firedraco told you last time it's not o- , It's -o Also, be very... (by helios)
by Rikazu
Confused Again [sorry]
 
Again looking through the guide, it told me to type this- #include <iostream> using namespace std ; int main() { // Declared then initialized. flo...
[4 replies] Last: @Rikazu Did you read the code or you just copied and pasted? Check l... (by Bazzy)
by Rikazu
Confused, Where do I put it?
 
A few hours ago I bought a C++ Programming book, called C++ Programming in easy steps by Mike Mcgrath. Im stuck on page 17. My guide told me to write this in...
[1 reply] : Before the return statement and after the variable declarations. (by helios)
unable to open include file
 
im new at c++, and i cant compile my first program please sombody help me! im using turbo c++ #include <stdio.h> int main(void) { printf("Hello, world...
[1 reply] : I'm confused at your difficulty. Pressing F9 (compile and run) or... (by Duthomhas)
by Joe101
Array of objects with no default constructor
 
I searched around the internet ..couldn't find out if there's any way to create an array of objects from a class with no default constructor. Couldn't find any ...
[3 replies] Last: Yer welcome. Don't be sorry about indents, just be consistent -- fo... (by Duthomhas)
by elnewb
Expected before numeric constant
 
Got two errors when compiling my program. #include "Token.h" #include <vector> using namespace std; class Grid { private: vector<vector<Token*> >...
[5 replies] Last: Constructors are as all other member functions so you can move their b... (by Bazzy)
comparing arrays?
 
Hi again I'm writing a code that decrypts certain text files using arrays. There is a permutation of 20 integers, and it applies the permutation to a char...
[6 replies] Last: Well, it's 9:15 here in NJ, so... You are aware that decryption and... (by Duthomhas)
confused among class error messages
 
class Vehicle { public: int passengers; // number of passengers int fuelcap; // fuel capacity in gallons int mpg; // fuel consumptio...
[2 replies] Last: I hate mistakes like that! Thank you Bazzy! (by mcleano)
How To : Printing Float Numbers ?
 
Hello .. I'm in front of a problem that I'm supposed to print the result of : 5.1234 ^ 15 the result is : 43992025569.928573701266488041146654993318703707511...
[12 replies] Last: Sorry this is new to me, have never heard of it before :S Dont worr... (by mcleano)
simple task
 
task: Create a program language C + +, which processes a text file in sequential mode. Data from the file, reads one symbol (do not read all at once a file o...
[3 replies] Last: #include <fstream> #include <iostream> using namespace std; in... (by aglonis)
Reading memory
 
How can i read computers memory effectively???
[8 replies] Last: And the header file for ReadProcessMemory is in windows.h, possibly wi... (by mackabee)
by Ty787
Problem when reading from a file with read() and write()
 
Hi everyone I am a new programmer and can't get this code to work The program should get a name and phone number from the user, write it to a file using write...
[1 reply] : Rule #1 of serialization: Do NOT directly convert an object to a strea... (by helios)
is domain_error in both <stdexcept> & <vector>?
 
I'm using VS++ 2008 V9 with Vista 64 SP1. #include <vector> using std::domain_error; int main() { try { return 0; } catch (domain_error...
[2 replies] Last: You are right; <vector> is directly or indirectly including <stdexcept... (by jsmith)
by j3lps
Pointer to class
 
Hi all, I'm trying to get a simple program to work, but have got stuck very early on, and can't figure out why. So I have a header file which define 2 classe...
[4 replies] Last: Basically all #include does is copy/paste the file into wherever you h... (by firedraco)
by netP
Double dots in middle of file path inside Makefile???
 
Hi, I am working on CBC library and C++. I got an example of make-file along with the library. In the file, there are lines (like the following) having "do...
[4 replies] Last: That clears all my questions! Thank you very much Duoas and Disch! (by netP)
July 2009 Pages: 1... 1617181920
  Archived months: [jun2009] [aug2009]

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