undefined symbol 'fout'

This is a discussion on undefined symbol 'fout' within the C++ Programming forums, part of the General Programming Boards category; I'm very unsure about what I'm doing here, the book I'm learning from doesn't give much explaination. Here's the code. ...

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    20

    undefined symbol 'fout'

    I'm very unsure about what I'm doing here, the book I'm learning from doesn't give much explaination. Here's the code.

    Code:
    #include <fstream.h>
    main ()
    {
    	char ch;
    	char filename[20]="a:test.text";
    	int mode=ios:: out;
    	fstream flout(filename, mode );
    	cout<<"ready for input:use control-z to end.";
    	cout<<endl;
    	while(cin.get(ch) )
    	{
    		fout.put( ch );//:confused:
    	}
    	fout.close();
    	return(0);
    }

  2. #2
    I'm Back
    Join Date
    Dec 2001
    Posts
    556
    fstream flout
    change flout--->fout

  3. #3
    Registered User
    Join Date
    Feb 2002
    Posts
    20
    feeling like an idiot . . . thanks
    Self Learner--patience required

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 03:07 AM
  2. Undefined Reference Compiling Error
    By AlakaAlaki in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 12:45 PM
  3. c++ linking problem for x11
    By kron in forum Linux Programming
    Replies: 1
    Last Post: 11-19-2004, 10:18 AM
  4. Stupid compiler errors
    By ChrisEacrett in forum C++ Programming
    Replies: 9
    Last Post: 11-30-2003, 05:44 PM
  5. Linking error
    By DockyD in forum C++ Programming
    Replies: 10
    Last Post: 01-20-2003, 05:27 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21