SlideShare a Scribd company logo
1 of 2
File I/O API - C++ Sample Program
04 Feb 03

Overview
Dictls32.exe is a C++ sample program which utilizes the File I/O API. It is a multiple

document interface (MDI) application which displays the dictionary information from SPSS data
files in one or more child windows. The user simply selects “Open” from the “File” menu to get a
standard Open File dialog. If the selected file is an SPSS data file, its dictionary information is
displayed in an edit control in a child window. The application is terminated by selecting “Exit”
from the “File” menu.
Building
The sample program has been built with version 6.0 of Microsoft Visual C++. Other compilers
may work, but they have not been tested. In order to build the sample program, perform the
following steps:
1. Copy all the files from the SPSSDeveloperio_dllsmpl_cpp directory on the
distribution disk to a directory on your hard disk.
2. Make sure spssdio.h is on the compiler’s search path - either by copying it to the directory
containing the sample program or by modifying the INCLUDE environment variable.
3. Made sure spssio32.lib is on the linker’s search path - either by copying the file to the
directory containing the sample program or by modifying the LIB environment variable.
4. Use the nmake utility to build the application:
nmake -f dictls32.mak DEBUG=1

Each of the makefiles recognizes two options which can either be set as environment variables or
defined on the command line. The first option is “DEBUG”. If this symbol is defined (regardless
of its value), the resulting executable will contain debug symbols. The default is not to include
debug symbols. The second option is “STATICMFC ”. If this symbol is defined (regardless of its
value), the resulting executable will contain statically-linked Microsoft Foundation Classes (MFC)
and C Run-Time. The default is to use DLL-resident versions of MFC and the C Run-Time.
The makefile writes its intermediate and target files to a subdirectory named “32”. In order to
execute the resulting application, spssio32.dll must be accessible at execution time.
Integrated Development Environment
Most users will opt to use Microsoft’s Integrated Development Environment (IDE) to build and
debug an application. The sample application is amenable to being built in this fashion. Simply
open dictls32.mak by selecting “Open Workspace” from the “File” menu. You will have to
select “Settings” on the “Build” menu to specify the name of the target file, the name of the
required DLL, and the debug build command line.
File I/O API - C++ Sample Program

04 Feb 03

Constituent Files
The following files are included as part of the sample program:
dictafx.cpp
dictafx.h
dictdoc.cpp
dictdoc.h
dictdoc.ico
dictlist.cpp
dictlist.h
dictls32.mak
dictls32.rc
dictmain.ico
dict-res.h

for building precompiled headers
includes the headers to be precompiled
CDocument class CDictListDoc - does all the work
Interface to class CDictListDoc
Icon for class CDictListDoc
CEditView class CDictListEditView and a CWinApp class
Interface to classes CDictListEditView and CDictListApp
External makefile
Resources
Icon for the application’s MDI frame window
Interface to the resources

-2-

More Related Content

Viewers also liked

Congresso sardegna 25 27 aprile slide shoe
Congresso sardegna 25 27 aprile slide shoeCongresso sardegna 25 27 aprile slide shoe
Congresso sardegna 25 27 aprile slide shoeGiuseppe Ferraioli
 
Resumen ejecutivo
Resumen ejecutivoResumen ejecutivo
Resumen ejecutivoCOLTITAN
 
Velocity the future of pharma
Velocity   the future of pharmaVelocity   the future of pharma
Velocity the future of pharmaKai Gait
 
O que-a-crianca-nao-pode-ficar-sem-por-ela-mesma
O que-a-crianca-nao-pode-ficar-sem-por-ela-mesmaO que-a-crianca-nao-pode-ficar-sem-por-ela-mesma
O que-a-crianca-nao-pode-ficar-sem-por-ela-mesmaIsac Soares
 
антивірус Dr
антивірус Drантивірус Dr
антивірус DrLesia88888
 
M8 lesson 3 1 function representations pdf
M8 lesson 3 1 function representations pdfM8 lesson 3 1 function representations pdf
M8 lesson 3 1 function representations pdflothomas
 
Aplicacion de estandare de calidad en la construccion de un algoritmo
Aplicacion de estandare de calidad en la construccion de un algoritmoAplicacion de estandare de calidad en la construccion de un algoritmo
Aplicacion de estandare de calidad en la construccion de un algoritmoJonmar Rodiguez
 
All About Menstruation
All About MenstruationAll About Menstruation
All About MenstruationBella India
 
Aplicacion de estandare de calidad en la construccion de un algoritmo
Aplicacion de estandare de calidad en la construccion de un algoritmoAplicacion de estandare de calidad en la construccion de un algoritmo
Aplicacion de estandare de calidad en la construccion de un algoritmoJonmar Rodiguez
 

Viewers also liked (16)

WEDGE-1 Artpower Publications China
WEDGE-1  Artpower Publications China WEDGE-1  Artpower Publications China
WEDGE-1 Artpower Publications China
 
Congresso sardegna 25 27 aprile slide shoe
Congresso sardegna 25 27 aprile slide shoeCongresso sardegna 25 27 aprile slide shoe
Congresso sardegna 25 27 aprile slide shoe
 
MCP_Certificate
MCP_CertificateMCP_Certificate
MCP_Certificate
 
Resumen ejecutivo
Resumen ejecutivoResumen ejecutivo
Resumen ejecutivo
 
Velocity the future of pharma
Velocity   the future of pharmaVelocity   the future of pharma
Velocity the future of pharma
 
O que-a-crianca-nao-pode-ficar-sem-por-ela-mesma
O que-a-crianca-nao-pode-ficar-sem-por-ela-mesmaO que-a-crianca-nao-pode-ficar-sem-por-ela-mesma
O que-a-crianca-nao-pode-ficar-sem-por-ela-mesma
 
Texto publicitario
Texto publicitarioTexto publicitario
Texto publicitario
 
антивірус Dr
антивірус Drантивірус Dr
антивірус Dr
 
M8 lesson 3 1 function representations pdf
M8 lesson 3 1 function representations pdfM8 lesson 3 1 function representations pdf
M8 lesson 3 1 function representations pdf
 
anas hassan c.v (QL)
anas hassan c.v (QL)anas hassan c.v (QL)
anas hassan c.v (QL)
 
personajes
personajespersonajes
personajes
 
Aplicacion de estandare de calidad en la construccion de un algoritmo
Aplicacion de estandare de calidad en la construccion de un algoritmoAplicacion de estandare de calidad en la construccion de un algoritmo
Aplicacion de estandare de calidad en la construccion de un algoritmo
 
ABHI finalslide
ABHI finalslideABHI finalslide
ABHI finalslide
 
All About Menstruation
All About MenstruationAll About Menstruation
All About Menstruation
 
Buku teks
Buku teksBuku teks
Buku teks
 
Aplicacion de estandare de calidad en la construccion de un algoritmo
Aplicacion de estandare de calidad en la construccion de un algoritmoAplicacion de estandare de calidad en la construccion de un algoritmo
Aplicacion de estandare de calidad en la construccion de un algoritmo
 

Similar to Smpl cpp

Programming in c_in_7_days
Programming in c_in_7_daysProgramming in c_in_7_days
Programming in c_in_7_daysAnkit Dubey
 
How to work with code blocks
How to work with code blocksHow to work with code blocks
How to work with code blocksTech Bikram
 
Introduction-to-C-Part-1 (1).doc
Introduction-to-C-Part-1 (1).docIntroduction-to-C-Part-1 (1).doc
Introduction-to-C-Part-1 (1).docMayurWagh46
 
WP7 HUB_Introducción a Visual Studio
WP7 HUB_Introducción a Visual StudioWP7 HUB_Introducción a Visual Studio
WP7 HUB_Introducción a Visual StudioMICTT Palma
 
Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812Pantech ProLabs India Pvt Ltd
 
Introduction-to-C-Part-1.pptx
Introduction-to-C-Part-1.pptxIntroduction-to-C-Part-1.pptx
Introduction-to-C-Part-1.pptxNEHARAJPUT239591
 
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJIntroduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJmeharikiros2
 
Prg 218 entire course
Prg 218 entire coursePrg 218 entire course
Prg 218 entire coursegrades4u
 
codeblocks-instructions.pdf
codeblocks-instructions.pdfcodeblocks-instructions.pdf
codeblocks-instructions.pdfRavinderKSingla
 
IP Lab Manual for Kerala University 3 Year UG Programme
IP Lab Manual for Kerala University 3 Year UG ProgrammeIP Lab Manual for Kerala University 3 Year UG Programme
IP Lab Manual for Kerala University 3 Year UG ProgrammeSAFAD ISMAIL
 
C++ was developed by Bjarne Stroustrup, as an extension to the C language. cp...
C++ was developed by Bjarne Stroustrup, as an extension to the C language. cp...C++ was developed by Bjarne Stroustrup, as an extension to the C language. cp...
C++ was developed by Bjarne Stroustrup, as an extension to the C language. cp...bhargavi804095
 
C++ helps you to format the I/O operations like determining the number of dig...
C++ helps you to format the I/O operations like determining the number of dig...C++ helps you to format the I/O operations like determining the number of dig...
C++ helps you to format the I/O operations like determining the number of dig...bhargavi804095
 
Getting started with code composer studio v4 for tms320 f2812
Getting started with code composer studio v4 for tms320 f2812Getting started with code composer studio v4 for tms320 f2812
Getting started with code composer studio v4 for tms320 f2812Pantech ProLabs India Pvt Ltd
 

Similar to Smpl cpp (20)

Visual programming
Visual programmingVisual programming
Visual programming
 
C++Basics2022.pptx
C++Basics2022.pptxC++Basics2022.pptx
C++Basics2022.pptx
 
Programming in c_in_7_days
Programming in c_in_7_daysProgramming in c_in_7_days
Programming in c_in_7_days
 
How to work with code blocks
How to work with code blocksHow to work with code blocks
How to work with code blocks
 
Introduction-to-C-Part-1 (1).doc
Introduction-to-C-Part-1 (1).docIntroduction-to-C-Part-1 (1).doc
Introduction-to-C-Part-1 (1).doc
 
WP7 HUB_Introducción a Visual Studio
WP7 HUB_Introducción a Visual StudioWP7 HUB_Introducción a Visual Studio
WP7 HUB_Introducción a Visual Studio
 
Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812
 
Introduction-to-C-Part-1.pptx
Introduction-to-C-Part-1.pptxIntroduction-to-C-Part-1.pptx
Introduction-to-C-Part-1.pptx
 
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJIntroduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
 
Unit i
Unit iUnit i
Unit i
 
C in7-days
C in7-daysC in7-days
C in7-days
 
C in7-days
C in7-daysC in7-days
C in7-days
 
Prg 218 entire course
Prg 218 entire coursePrg 218 entire course
Prg 218 entire course
 
codeblocks-instructions.pdf
codeblocks-instructions.pdfcodeblocks-instructions.pdf
codeblocks-instructions.pdf
 
IP Lab Manual for Kerala University 3 Year UG Programme
IP Lab Manual for Kerala University 3 Year UG ProgrammeIP Lab Manual for Kerala University 3 Year UG Programme
IP Lab Manual for Kerala University 3 Year UG Programme
 
C++ was developed by Bjarne Stroustrup, as an extension to the C language. cp...
C++ was developed by Bjarne Stroustrup, as an extension to the C language. cp...C++ was developed by Bjarne Stroustrup, as an extension to the C language. cp...
C++ was developed by Bjarne Stroustrup, as an extension to the C language. cp...
 
C++ helps you to format the I/O operations like determining the number of dig...
C++ helps you to format the I/O operations like determining the number of dig...C++ helps you to format the I/O operations like determining the number of dig...
C++ helps you to format the I/O operations like determining the number of dig...
 
Getting started with code composer studio v4 for tms320 f2812
Getting started with code composer studio v4 for tms320 f2812Getting started with code composer studio v4 for tms320 f2812
Getting started with code composer studio v4 for tms320 f2812
 
Android
Android Android
Android
 
Android Basic
Android BasicAndroid Basic
Android Basic
 

Smpl cpp

  • 1. File I/O API - C++ Sample Program 04 Feb 03 Overview Dictls32.exe is a C++ sample program which utilizes the File I/O API. It is a multiple document interface (MDI) application which displays the dictionary information from SPSS data files in one or more child windows. The user simply selects “Open” from the “File” menu to get a standard Open File dialog. If the selected file is an SPSS data file, its dictionary information is displayed in an edit control in a child window. The application is terminated by selecting “Exit” from the “File” menu. Building The sample program has been built with version 6.0 of Microsoft Visual C++. Other compilers may work, but they have not been tested. In order to build the sample program, perform the following steps: 1. Copy all the files from the SPSSDeveloperio_dllsmpl_cpp directory on the distribution disk to a directory on your hard disk. 2. Make sure spssdio.h is on the compiler’s search path - either by copying it to the directory containing the sample program or by modifying the INCLUDE environment variable. 3. Made sure spssio32.lib is on the linker’s search path - either by copying the file to the directory containing the sample program or by modifying the LIB environment variable. 4. Use the nmake utility to build the application: nmake -f dictls32.mak DEBUG=1 Each of the makefiles recognizes two options which can either be set as environment variables or defined on the command line. The first option is “DEBUG”. If this symbol is defined (regardless of its value), the resulting executable will contain debug symbols. The default is not to include debug symbols. The second option is “STATICMFC ”. If this symbol is defined (regardless of its value), the resulting executable will contain statically-linked Microsoft Foundation Classes (MFC) and C Run-Time. The default is to use DLL-resident versions of MFC and the C Run-Time. The makefile writes its intermediate and target files to a subdirectory named “32”. In order to execute the resulting application, spssio32.dll must be accessible at execution time. Integrated Development Environment Most users will opt to use Microsoft’s Integrated Development Environment (IDE) to build and debug an application. The sample application is amenable to being built in this fashion. Simply open dictls32.mak by selecting “Open Workspace” from the “File” menu. You will have to select “Settings” on the “Build” menu to specify the name of the target file, the name of the required DLL, and the debug build command line.
  • 2. File I/O API - C++ Sample Program 04 Feb 03 Constituent Files The following files are included as part of the sample program: dictafx.cpp dictafx.h dictdoc.cpp dictdoc.h dictdoc.ico dictlist.cpp dictlist.h dictls32.mak dictls32.rc dictmain.ico dict-res.h for building precompiled headers includes the headers to be precompiled CDocument class CDictListDoc - does all the work Interface to class CDictListDoc Icon for class CDictListDoc CEditView class CDictListEditView and a CWinApp class Interface to classes CDictListEditView and CDictListApp External makefile Resources Icon for the application’s MDI frame window Interface to the resources -2-