Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++
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 December 29th, 2004, 12:50 PM
ck ck is offline
Authorized User
Join Date: Dec 2004
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default Pls Help Me Check This Code - Win32

 tis is the code that write/create, read the file in Win32.how can i put write code together with read code??? & how to get & display the bitmap pathname??? pls help me check what's wrong of this code, thanks a lot :(


#include "stdafx.h"
#include "Finger_FASS.h"
#include <stdio.h>
#include <stdlib.h>
#include <iostream>

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;

// The one and only application object

CWinApp theApp;

using namespace std;

int main()

    char Name[10];
    char Bitmap[256];

    //Write File To tmp or Create tmp
    FILE *Load = fopen("FASS.inv", "w");

    cout << "Enter the following information\n";
    cout << "Name: "; gets(Name);

    //Open Directory
    _TCHAR szFileTitle[MAX_PATH] = {0};
    _TCHAR szTitle[MAX_PATH] = _TEXT("Open Dammit");

    OPENFILENAME openfile;
    openfile.lStructSize = sizeof(openfile);
    openfile.lpstrTitle = szTitle;
    openfile.Flags = OFN_FILEMUSTEXIST;
    openfile.lpstrFile = szFileTitle;
    openfile.nMaxFile = MAX_PATH;
    openfile.lpstrFilter = ("Bitmap Files (*.bmp)\0*.bmp\0\0");

    cout << "Bitmap: ";

    if(GetOpenFileName(&openfile) == FALSE)

    fprintf(Load, "%s\n", Name);
    fprintf(Load, "%s\n", Bitmap);


    cout << endl;
    return 0;

    //Read File From tmp
    FILE *FASS = fopen("FASS.inv", "r+");

    fscanf(FASS, "%s\n", Name);
    fscanf(FASS, "%s\n", Bitmap);

    cout << "Information about the FASS";
    cout << "\nName: " << Name;
    cout << "\nBitmap: " << Bitmap;


    cout << endl;
    return 0;



Similar Threads
Thread Thread Starter Forum Replies Last Post
code to check values in two columns?? Mazzy Excel VBA 2 December 13th, 2007 07:39 AM
Pls Help Me Check This Code - Win32 ck C++ Programming 4 January 13th, 2005 12:14 AM
Plz Help Me Check What's Wrong Of This Code ! ck C++ Programming 1 January 13th, 2005 12:12 AM
check my code nadia Dreamweaver (all versions) 4 October 21st, 2004 12:46 PM

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