Wrox Programmer Forums
|
Visual C++ Questions specific to Microsoft's Visual C++. For questions not specific to this Microsoft version, use the C++ Programming forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 27th, 2004, 08:10 AM
Registered User
 
Join Date: Jul 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default files

hi there,
I am studying about jpeg format. I want to display picture with jpeg format from its data file.

Other one is that, what is faulty in that program code. I am trying to declare a class. Why i can not initialize ifstream gird, ofstream cikd? Can you help me?

#include <fstream.h>
#include <iostream.h>
#include <iomanip.h>

class resim
{
public:

    ifstream &gird;
    ofstream &cikd;
    char *baslik;
    resim();
bool oku(ifstream &gird,ofstream &cikd);
};

resim::resim()
{

    ifstream gird("600.jpg",ios::in|ios::binary);
    ofstream cikd("karis.dat");
}

bool resim::oku(ifstream &gird,ofstream &cikd)
{ short a;
    if (!gird) {
        cout<<"HATA ! dosya açýlamadý"<<endl;
    return false;
}
    while (!gird.eof()){
    gird.read((char *) &a,2);
    cikd<<hex<<a; }
    return true;

}



 int main()
 {
    resim ben;

         if (!ben.oku(ben.gird,ben.cikd)) { cout<<"HATA ! okuma olmadý"<<endl;
    return 1;
         }
         return 0;
 }







Similar Threads
Thread Thread Starter Forum Replies Last Post
Generating Excel FIles from resource Files abinashpatra ASP.NET 1.0 and 1.1 Basics 0 July 28th, 2008 02:07 AM
compare 2 files and output third files mtnguye6 VBScript 0 April 14th, 2008 11:03 AM
.php files vs .html files pbuongiovanni PHP How-To 2 January 5th, 2006 04:15 AM
decrypt files from zip files mmmobasher VS.NET 2002/2003 0 January 21st, 2004 03:19 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.