dev-cpp-users Mailing List for Dev-C++
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(15) |
Oct
(115) |
Nov
(154) |
Dec
(258) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(377) |
Feb
(260) |
Mar
(249) |
Apr
(188) |
May
(152) |
Jun
(150) |
Jul
(195) |
Aug
(202) |
Sep
(200) |
Oct
(286) |
Nov
(242) |
Dec
(165) |
| 2002 |
Jan
(245) |
Feb
(241) |
Mar
(239) |
Apr
(346) |
May
(406) |
Jun
(369) |
Jul
(418) |
Aug
(357) |
Sep
(362) |
Oct
(597) |
Nov
(455) |
Dec
(344) |
| 2003 |
Jan
(446) |
Feb
(397) |
Mar
(515) |
Apr
(524) |
May
(377) |
Jun
(387) |
Jul
(532) |
Aug
(364) |
Sep
(294) |
Oct
(352) |
Nov
(295) |
Dec
(327) |
| 2004 |
Jan
(416) |
Feb
(318) |
Mar
(324) |
Apr
(249) |
May
(259) |
Jun
(218) |
Jul
(212) |
Aug
(259) |
Sep
(158) |
Oct
(162) |
Nov
(214) |
Dec
(169) |
| 2005 |
Jan
(111) |
Feb
(165) |
Mar
(199) |
Apr
(147) |
May
(131) |
Jun
(163) |
Jul
(235) |
Aug
(136) |
Sep
(84) |
Oct
(88) |
Nov
(113) |
Dec
(100) |
| 2006 |
Jan
(85) |
Feb
(119) |
Mar
(33) |
Apr
(31) |
May
(56) |
Jun
(68) |
Jul
(18) |
Aug
(62) |
Sep
(33) |
Oct
(55) |
Nov
(19) |
Dec
(40) |
| 2007 |
Jan
(22) |
Feb
(49) |
Mar
(34) |
Apr
(51) |
May
(66) |
Jun
(43) |
Jul
(116) |
Aug
(57) |
Sep
(70) |
Oct
(69) |
Nov
(97) |
Dec
(86) |
| 2008 |
Jan
(32) |
Feb
(47) |
Mar
(106) |
Apr
(67) |
May
(28) |
Jun
(39) |
Jul
(31) |
Aug
(25) |
Sep
(18) |
Oct
(25) |
Nov
(5) |
Dec
(21) |
| 2009 |
Jan
(33) |
Feb
(27) |
Mar
(27) |
Apr
(22) |
May
(22) |
Jun
(10) |
Jul
(17) |
Aug
(9) |
Sep
(21) |
Oct
(13) |
Nov
(4) |
Dec
(11) |
| 2010 |
Jan
(10) |
Feb
(8) |
Mar
(4) |
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(8) |
Oct
(26) |
Nov
(9) |
Dec
(1) |
| 2011 |
Jan
(21) |
Feb
(16) |
Mar
(4) |
Apr
(19) |
May
(26) |
Jun
(9) |
Jul
(6) |
Aug
|
Sep
(4) |
Oct
(3) |
Nov
(2) |
Dec
(1) |
| 2012 |
Jan
(4) |
Feb
(7) |
Mar
(4) |
Apr
|
May
(1) |
Jun
(10) |
Jul
(1) |
Aug
(1) |
Sep
(18) |
Oct
(3) |
Nov
(1) |
Dec
(1) |
| 2013 |
Jan
(4) |
Feb
(2) |
Mar
(15) |
Apr
(6) |
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
(9) |
Dec
|
| 2014 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(4) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(4) |
| 2015 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(2) |
Oct
(9) |
Nov
(35) |
Dec
(6) |
| 2016 |
Jan
(7) |
Feb
(10) |
Mar
(10) |
Apr
(9) |
May
(13) |
Jun
(9) |
Jul
(1) |
Aug
(3) |
Sep
(3) |
Oct
(1) |
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
1
(6) |
2
(1) |
3
(18) |
4
(10) |
5
(3) |
6
(6) |
7
(2) |
|
8
(2) |
9
(2) |
10
(3) |
11
(4) |
12
(6) |
13
(3) |
14
(1) |
|
15
|
16
(2) |
17
(11) |
18
(6) |
19
(4) |
20
(11) |
21
(14) |
|
22
(12) |
23
(9) |
24
(5) |
25
(3) |
26
(1) |
27
(4) |
28
(3) |
|
29
(7) |
30
(24) |
31
(12) |
|
|
|
|
|
From: Alan T. <ala...@3n...> - 2001-07-31 22:38:42
|
If I open the file in binary mode, then I get absolutely nothing printed
out. Alan
From: "Lorenzo" <co...@in...>
To: <dev...@li...>
Subject: Re: [Dev-C++] reading bytes
Date: Tue, 31 Jul 2001 09:40:20 +0200
Reply-To: dev...@li...
Try to open file in binary mode using the following code:
ifstream input_file(file, ios::binary);
----- Original Message -----
From: Alan Thomas
To: dev...@li...
Sent: Monday, July 30, 2001 9:29 PM
Subject: reading bytes
I am trying to read bytes from a file. I just read them as characters
and interpret them, since each character takes a byte. The file is a
Microsoft Excel file. However, the bytes look different that expected. The
first few bytes (in decimal) are: 9, 4, 6, 0, 0, 0, 16, 0 instead of
9, 0, 4, 0, 2, 0, 16, 0. Can anyone explain what is happening?
My code and the Excel file format (first few bytes) may be found
below. Thanks, Alan
void main()
{
// Define input & output file names
char *file = "test.xls";
char c;
int byte_no = 0;
// Open input file
ifstream input_file(file);
// read the first byte of file
while (input_file.get(c))
{
if ((byte_no >= 0) && (byte_no <= 7))
cout << endl << "Byte " << byte_no << " is " << short(c) << endl;
byte_no++;
}
// close input file
input_file.close();
system ("PAUSE");
}
Format may be found at: http://www.wotsit.org/search.asp?page=2&s=database
MICROSOFT EXCEL FILE FORMAT
Microsoft Excel is a popular spreadsheet. It uses a file format called BIFF
(Binary
File Format). There are many types of BIFF records. Each has a 4 byte
header. The
first two bytes are an opcode that specifies the record type. The second
two bytes
specify record length. Header values are stored in byte-reversed form (less
significant
byte first). The rest of the record is the data itself (Figure 2-1).
Figure 2-1. BIFF record header.
| Record Header | Record Body
Byte Number | 0 1 2 3 | 0 1 ...
-----------------------------------
Record Contents | XX | XX | XX | XX | XX | XX | ...
-----------------------------------
| opcode | length | data
Each X represents a hexadecimal digit
Two X's form a byte. The least significant (low) byte of the opcode is byte
0 and the
most significant (high) byte is byte 1. Similarly, the low byte of the
record length
field is byte 2 and the high byte is byte 3.
BOF (Beginning of File)
The first record in every spreadsheet is always of the BOF type (Figure
2-2).
Figure 2-2. BOF record.
| Record Header | Record Body |
Byte | 0 1 2 3 | 0 1 2 3 |
-----------------------------------------
Contents | 09 | 00 | 04 | 00 | 02 | 00 | 10 | 00 |
-----------------------------------------
| opcode | length | version | file |
| | | number | type |
The first two bytes, arranged with the low byte first, show that the opcode
for BOF is
09h. The second two bytes indicate that the record body is 4 bytes long.
The first two
bytes of the body are the version number (2 for the initial version of
Excel). The last
two bytes are the file type. Type 10h is a worksheet file.
|
|
From: <jsc...@gm...> - 2001-07-31 21:09:18
|
HA !!!! I am about to exactly do this to compile my code for VST. Currently i am preparing code for audio / midi to sell to custores - and furthermore are preparing to put it itto this new DSP engine - see www.soundarthot.com Lets stay in contact to get DEV CPP runninng for VST compile. best wishes to you www.solastudio.de On 31 Jul 2001, at 19:25, Gabriel Lindeborg wrote: > Gabriel Lindeborg <gab...@sv...> J=FCrgen Schuhmacher jsc...@gm... |
|
From: Gabriel L. <gab...@sv...> - 2001-07-31 17:25:21
|
Hi! Has Anyone tried to make VST-plugins using Dev-C++. I am and can't even compile the example files in Steinbergs (www.steinberg.net) SDK without getting errors bout lacking casts and such. All help much app. ys Gabbe of Sweden ................................................................ SVERIGES ENKLASTE E-POSTADRESS! - http://www.sverige.nu SVERIGES NYA ADRESSREGISTER! - http://www.adress.nu |
|
From: Dot <do...@vo...> - 2001-07-31 11:45:57
|
>> C:\WINDOWS\TEMP\cch7Xfgb.o(.text+0x94):hellow~1.cpp: undefined reference to >> `GetStockObject@4' If you still need help... ...just put -lgdi32 into the project options "Further object files or linker options", it will help |
|
From: Lorenzo <co...@in...> - 2001-07-31 07:42:29
|
Try to open file in binary mode using the following code:
ifstream input_file(file, ios::binary);
----------------------------------------------------------------------------
---
If debugging is the process of removing bugs,
then programming must be the process of putting them in.
----------------------------------------------------------------------------
---
|
|
From: Ramana K. <ra...@my...> - 2001-07-31 07:11:07
|
Make sure you are compling for windows (no console) and include all
necessary libs and include files.
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...]On Behalf Of Alan Thomas
Sent: Tuesday, 31 July 2001 1:46 PM
To: dev...@li...
Subject: [Dev-C++] windows program will no longer compile
The program below (hello windows) used to compile. Had to wipe my hard
disk and reinstall everything, including Dev C++. Now when I compile, I get
the following Linker error:
C:\WINDOWS\TEMP\cch7Xfgb.o(.text+0x94):hellow~1.cpp: undefined reference to
`GetStockObject@4'. I think it just must be some environment option set
wrong. Any ideas?
Thanks, Alan
#include <windows.h>
#include <iostream.h>
/* Declare Windows procedure */
LRESULT CALLBACK WindowProcedure(HWND, UINT, WPARAM, LPARAM);
/* Make the class name into a global variable */
char szClassName[ ] = "WindowsApp";
int WINAPI WinMain(HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR
lpszArgument, int nFunsterStil)
{
HWND hwnd; /* This is the handle for our window */
MSG messages; /* Here messages to the application are saved
*/
WNDCLASSEX wincl; /* Data structure for the windowclass */
/* The Window structure */
wincl.hInstance = hThisInstance;
wincl.lpszClassName = szClassName;
wincl.lpfnWndProc = WindowProcedure; /* This function is called by
windows */
wincl.style = CS_DBLCLKS; /* Catch double-clicks */
wincl.cbSize = sizeof(WNDCLASSEX);
/* Use default icon and mouse-pointer */
wincl.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wincl.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
wincl.hCursor = LoadCursor(NULL, IDC_ARROW);
wincl.lpszMenuName = NULL; /* No menu */
wincl.cbClsExtra = 0; /* No extra bytes after the
window class */
wincl.cbWndExtra = 0; /* structure or the window
instance */
/* Use light-gray as the background of the window */
wincl.hbrBackground = (HBRUSH) GetStockObject(LTGRAY_BRUSH);
/* Register the window class, if fail quit the program */
if(!RegisterClassEx(&wincl)) return 0;
/* The class is registered, let's create the program*/
hwnd = CreateWindowEx(
0, /* Extended possibilites for variation */
szClassName, /* Classname */
"Windows App", /* Title Text */
WS_OVERLAPPEDWINDOW, /* default window */
CW_USEDEFAULT, /* Windows decides the position */
CW_USEDEFAULT, /* where the window ends up on the screen */
544, /* The programs width */
375, /* and height in pixels */
HWND_DESKTOP, /* The window is a child-window to desktop
*/
NULL, /* No menu */
hThisInstance, /* Program Instance handler */
NULL /* No Window Creation data */
);
/* Make the window visible on the screen */
ShowWindow(hwnd, nFunsterStil);
/* Run the message loop. It will run until GetMessage( ) returns 0 */
while(GetMessage(&messages, NULL, 0, 0))
{
/* Translate virtual-key messages into character messages */
TranslateMessage(&messages);
/* Send message to WindowProcedure */
DispatchMessage(&messages);
}
/* The program return-value is 0 - The value that PostQuitMessage( )
gave */
return messages.wParam;
}
/* This function is called by the Windows function DispatchMessage( ) */
LRESULT CALLBACK WindowProcedure(HWND hwnd, UINT message, WPARAM wParam,
LPARAM lParam)
{
switch (message) /* handle the messages */
{
case WM_DESTROY:
PostQuitMessage(0); /* send a WM_QUIT to the message queue
*/
break;
default: /* for messages that we don't deal
with */
return DefWindowProc(hwnd, message, wParam, lParam);
}
return 0;
}
int main()
{
int user_input;
cout<<"HEY, you, I'm alive! Oh, and Hello World!";
cin>>user_input;
return 0;
}
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: Ramana K. <ra...@my...> - 2001-07-31 07:08:10
|
Yes, I think you must make sure that Dev-C++ is only using DirectX header files where there are dev-c++ header files of the same name. In English: If there is a file in DirectX include directory and the same file in Dev-C++ include directory (c:\dev-c++\include) move the dev-c++ one somewhere safe and put the directx one in its place. Also you might need some platform SDK files. By the way, using the "Microsoft" files maybe the solution because the files are new, updated, and more compatible with directx. Before you mess around with your files though, maybe you should check some other stuff, like all the libs are linked correctly, you are using the right functions and you have the right dlls available (you might need vfw32.dll, for example) I hope this helps Ramana -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of Chris Hague Sent: Tuesday, 31 July 2001 9:36 AM To: dev...@li... Subject: [Dev-C++] DirectX problem, help needed Hi, I have linked the compiler with the .h and .lib directories in the DirectX SDK, though I receive 31 error messages every time I attempt to compile a program that uses any directx header files. Does anyone know how to fix this? Does anyone know how to setup DirectX at all? Please post info here or e-mail me, thanks. Fierytycoon _____ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ <http://phonecard.yahoo.com/?.refer=mailtagline> |
|
From: Ray W. <ra...@in...> - 2001-07-31 06:49:58
|
You can only effectively use one return statement in a function,
whether it is a class function or a regular function. The first
'return' statement will cause the function to terminate and return
back to the program which called it.
To return more than one value from a function you need to use
what's called 'call by reference' parameters; your function would
look like this - void AssignDate(int& month, int& day, int& year)
and then the function defination would follow. The '&' symbol
following the type specification allows the function to modify
the actual values passed to it, so somewhere in your function
defination you would want the month = some_value; day = some_other_value;
and year = still_another_value; then you can
use a return statement without a parameter (since function is void)
to terminate the function and lo and behold the variables you
passed to the function will now have the new values in them.
This use of 'call by reference' as opposed to 'call by value' is not
restricted to class methods or functions, but applies to all
functions. The 'call by reference' passes the address of the
variable to the function so that the actual value may be changed,
while the 'call by value' (which is what you get without the '&' only
passes the value of the passed variable and the function cannot modify the
variable which is passed.
bye, ray w.
At 09:43 PM 7/30/01 +0200, you wrote:
> -----Original Message-----
>From: dev...@li...
>[mailto:dev...@li...] On Behalf Of
>Tre...@ao...
>Sent: Monday, July 30, 2001 8:32 PM
>To: dev...@li...
>Subject: [Dev-C++] Class question
>
> After creating the
>class and compiling my program I get the following error.
>
>warning C4715: 'Date::assignDate' : not all control paths return a value
>
> It is supposed to validate a date entered and display the
>
>
><>
>using namespace std;
>
>class Date
>{
>public:
>Date();
>int assignDate(int, int, int);
>void displayDate();
>
>private:
>int month;
>int day;
>int year;
>};
>
>Date::Date()
>{
>month = 0;
> = 0;
> = 0;
>} //end of default constructor
>
>int Date::assignDate(int m, int d, int y)
>{
>month = m;
> = d;
> = y;
>
>>&&<= 12)
>{
>if (m = 2)
>if (y % 4 == 0)
>>&&<= 29)
>{
>return m;
>return d;
>return y;
>}
>>&&<= 28)
>
>return m;
>return d;
>return y;
>}
>else if (m == 4 || m == 6 || m == 9 || m == 11)
>>&&<= 30)
>{
>
> These 2 are not returned. return y;
>}
> else if (m == 1 || m == 3 || m == 5 || m == 7 || m == 8 || m ==
>10 || m == 11)
>>&&<= 31)
>{
> These 2 are not returned. return d;
>return y;
>}
>}//end loop
>else
><<<< endl;
>//end ifs
>
>
>} //end of assignDate function
>
>
>void Date::displayDate()
>{
><<<<<<<<<< year;
> There are probably more errors too, but fix them first.
> * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com *
>Alternative URL: http://run.to/noicys
>
Ray Witter
|
|
From: Alan T. <ala...@3n...> - 2001-07-31 04:12:57
|
The program below (hello windows) used to compile. Had to wipe my hard
disk and reinstall everything, including Dev C++. Now when I compile, I get
the following Linker error:
C:\WINDOWS\TEMP\cch7Xfgb.o(.text+0x94):hellow~1.cpp: undefined reference to
`GetStockObject@4'. I think it just must be some environment option set
wrong. Any ideas?
Thanks, Alan
#include <windows.h>
#include <iostream.h>
/* Declare Windows procedure */
LRESULT CALLBACK WindowProcedure(HWND, UINT, WPARAM, LPARAM);
/* Make the class name into a global variable */
char szClassName[ ] = "WindowsApp";
int WINAPI WinMain(HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR
lpszArgument, int nFunsterStil)
{
HWND hwnd; /* This is the handle for our window */
MSG messages; /* Here messages to the application are saved
*/
WNDCLASSEX wincl; /* Data structure for the windowclass */
/* The Window structure */
wincl.hInstance = hThisInstance;
wincl.lpszClassName = szClassName;
wincl.lpfnWndProc = WindowProcedure; /* This function is called by
windows */
wincl.style = CS_DBLCLKS; /* Catch double-clicks */
wincl.cbSize = sizeof(WNDCLASSEX);
/* Use default icon and mouse-pointer */
wincl.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wincl.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
wincl.hCursor = LoadCursor(NULL, IDC_ARROW);
wincl.lpszMenuName = NULL; /* No menu */
wincl.cbClsExtra = 0; /* No extra bytes after the
window class */
wincl.cbWndExtra = 0; /* structure or the window
instance */
/* Use light-gray as the background of the window */
wincl.hbrBackground = (HBRUSH) GetStockObject(LTGRAY_BRUSH);
/* Register the window class, if fail quit the program */
if(!RegisterClassEx(&wincl)) return 0;
/* The class is registered, let's create the program*/
hwnd = CreateWindowEx(
0, /* Extended possibilites for variation */
szClassName, /* Classname */
"Windows App", /* Title Text */
WS_OVERLAPPEDWINDOW, /* default window */
CW_USEDEFAULT, /* Windows decides the position */
CW_USEDEFAULT, /* where the window ends up on the screen */
544, /* The programs width */
375, /* and height in pixels */
HWND_DESKTOP, /* The window is a child-window to desktop
*/
NULL, /* No menu */
hThisInstance, /* Program Instance handler */
NULL /* No Window Creation data */
);
/* Make the window visible on the screen */
ShowWindow(hwnd, nFunsterStil);
/* Run the message loop. It will run until GetMessage( ) returns 0 */
while(GetMessage(&messages, NULL, 0, 0))
{
/* Translate virtual-key messages into character messages */
TranslateMessage(&messages);
/* Send message to WindowProcedure */
DispatchMessage(&messages);
}
/* The program return-value is 0 - The value that PostQuitMessage( )
gave */
return messages.wParam;
}
/* This function is called by the Windows function DispatchMessage( ) */
LRESULT CALLBACK WindowProcedure(HWND hwnd, UINT message, WPARAM wParam,
LPARAM lParam)
{
switch (message) /* handle the messages */
{
case WM_DESTROY:
PostQuitMessage(0); /* send a WM_QUIT to the message queue
*/
break;
default: /* for messages that we don't deal
with */
return DefWindowProc(hwnd, message, wParam, lParam);
}
return 0;
}
int main()
{
int user_input;
cout<<"HEY, you, I'm alive! Oh, and Hello World!";
cin>>user_input;
return 0;
}
|
|
From: Luigi S. <gi...@li...> - 2001-07-31 01:44:25
|
Hi Paul, I've got two hints for you: 1) Use Dev C++: - start Dev C++ - do not open your 50 file project, instead open the file you wish to compile - use "Execute-Compile" (or click on the "compile project" icon). The compiling results should give you at least one error because Dev was unable to make an executable out of the single file that you asked to compile. 2) directly use gcc - enter a DOS box (and make sure that gcc is in your path) - run the command: "gcc -c foo.c" or "g++ -c bar.cpp" I personally use solution 2. To make it easier I wrote a batch file that allows you to compile a single file, from the command line, by the syntax: "cxx foo.c", if you are interested you can find it among the "xtools" in the package section of the Dev-C++ Resource Site (www.bloodshed.net/dev/) Hope this helps. At 23.40 28/07/01 -0700, you wrote: >I have a project with about 50 files in it and I >need to be able to compile just a single file at >a time, but Bloodshed C++ doesn't seem to let me >do this. There is only the 'compile' menu item and >it compiles all files every time. This is very slow. > >So how do you compile a single file at a time??? > > > >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >http://lists.sourceforge.net/lists/listinfo/dev-cpp-users -- gisan |
|
From: Alan T. <ala...@3n...> - 2001-07-31 01:32:43
|
I am trying to read bytes from a file. I just read them as =
characters and interpret them, since each character takes a byte. The =
file is a Microsoft Excel file. However, the bytes look different that =
expected. The first few bytes (in decimal) are: 9, 4, 6, 0, 0, 0, 16, =
0 instead of=20
9, 0, 4, 0, 2, 0, 16, 0. Can anyone explain what is happening? =20
My code and the Excel file format (first few bytes) may be found =
below. Thanks, Alan
void main()
{
// Define input & output file names
char *file =3D "test.xls";
char c;
int byte_no =3D 0;
// Open input file
ifstream input_file(file);
// read the first byte of file
while (input_file.get(c))
{
if ((byte_no >=3D 0) && (byte_no <=3D 7))
cout << endl << "Byte " << byte_no << " is " << short(c) << =
endl;
byte_no++;
}
// close input file
input_file.close();
system ("PAUSE");
}
Format may be found at: =
http://www.wotsit.org/search.asp?page=3D2&s=3Ddatabase
MICROSOFT EXCEL FILE FORMAT
Microsoft Excel is a popular spreadsheet. It uses a file format called =
BIFF (Binary
File Format). There are many types of BIFF records. Each has a 4 byte =
header. The
first two bytes are an opcode that specifies the record type. The =
second two bytes
specify record length. Header values are stored in byte-reversed form =
(less significant
byte first). The rest of the record is the data itself (Figure 2-1).
Figure 2-1. BIFF record header.
| Record Header | Record Body
Byte Number | 0 1 2 3 | 0 1 ...
-----------------------------------
Record Contents | XX | XX | XX | XX | XX | XX | ...
-----------------------------------
| opcode | length | data
=20
Each X represents a hexadecimal digit
Two X's form a byte. The least significant (low) byte of the opcode is =
byte 0 and the
most significant (high) byte is byte 1. Similarly, the low byte of the =
record length
field is byte 2 and the high byte is byte 3.
BOF (Beginning of File)
The first record in every spreadsheet is always of the BOF type (Figure =
2-2). =20
Figure 2-2. BOF record.
| Record Header | Record Body |
Byte | 0 1 2 3 | 0 1 2 3 |
-----------------------------------------
Contents | 09 | 00 | 04 | 00 | 02 | 00 | 10 | 00 |
-----------------------------------------
| opcode | length | version | file |
| | | number | type |
The first two bytes, arranged with the low byte first, show that the =
opcode for BOF is
09h. The second two bytes indicate that the record body is 4 bytes =
long. The first two
bytes of the body are the version number (2 for the initial version of =
Excel). The last
two bytes are the file type. Type 10h is a worksheet file.
|
|
From: Jared <sto...@ya...> - 2001-07-31 00:47:20
|
I don't see any button to ignore compiler warnings how can you? _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
|
From: Chris H. <fie...@ya...> - 2001-07-30 23:36:17
|
Hi, I have linked the compiler with the .h and .lib directories in the DirectX SDK, though I receive 31 error messages every time I attempt to compile a program that uses any directx header files. Does anyone know how to fix this? Does anyone know how to setup DirectX at all? Please post info here or e-mail me, thanks. Fierytycoon --------------------------------- Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ |
|
From: Colin L. <col...@wa...> - 2001-07-30 21:48:37
|
Hi all ! Dev-C++ for Linux 0.7.0 has been released :) This is a beta version, it is not really usable yet. You can download it here : http://www.bloodshed.net/dev/ If you want to report bugs (that is great :) please read this file : http://www.haikuzone.org/dev/linux/README-BETA.txt Enjoy :) Colin |
|
From: Ioannis V. <no...@ya...> - 2001-07-30 21:28:33
|
Read, this is condition of emergency. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com * Alternative URL: http://run.to/noicys -----Original Message----- From: Microsoft Product Security Notification Service [mailto:MIC...@AN...] On Behalf Of Microsoft Product Security Sent: Monday, July 30, 2001 8:39 PM To: MIC...@AN... Subject: URGENT MICROSOFT SECURITY ANNOUNCEMENT The following is a Security Bulletin from the Microsoft Product Security Notification Service. Please do not reply to this message, as it was sent from an unattended mailbox. ******************************** -----BEGIN PGP SIGNED MESSAGE----- - ---------------------------------------------------------------------- The Microsoft Security Response Center, along with other=20 organizations listed below, is jointly publishing this alert that=20 ALL IIS ADMINISTRATORS ARE ASKED TO READ A Very Real and Present Threat to the Internet: July 31 Deadline For Action Summary:=20 The Code Red Worm and mutations of the worm pose a continued and serious threat to Internet users. Immediate action is required to combat this threat. Users who have deployed software that is vulnerable to the worm (Microsoft IIS=20 Versions 4.0 and 5.0) must install, if they have not done so already, a vital security patch. How Big Is The Problem?=20 On July 19, the Code Red worm infected more than 250,000 systems in just 9 hours. The worm scans the Internet, identifies vulnerable systems, and infects these systems by installing itself. Each newly installed worm joins all the others causing the rate of scanning to grow rapidly. This uncontrolled growth in scanning directly decreases the speed of the Internet and can cause sporadic but widespread outages among all types of systems. Code Red is likely to start spreading again on July 31st, 2001 8:00 PM EDT and has mutated so that it may be even more dangerous. This spread has the potential to disrupt business and personal use of the Internet for applications such as electronic commerce, email and entertainment. Who Must Act?=20 Every organization or person who has Windows NT or Windows 2000 systems AND the IIS web server software may be vulnerable. IIS is installed automatically for many applications. If you=20 are not certain, follow the instructions attached to determine whether you are running IIS 4.0 or 5.0. If you are using Windows 95, Windows 98, or Windows Me, there is no action that you need to take in response to this alert. What To Do If You Are Vulnerable? =20 a. To rid your machine of the current worm, reboot your computer. b. To protect your system from re-infection:=20 Install Microsoft's patch for the Code Red vulnerability problem: - - Windows NT version 4.0: http://www.microsoft.com/Downloads/Release.asp?ReleaseID=3D30833 - - Windows 2000 Professional, Server and Advanced Server: http://www.microsoft.com/Downloads/Release.asp?ReleaseID=3D30800 Step-by-step instructions for these actions are posted at http://www.microsoft.com/technet/treeview/default.asp? url=3D/technet/itsolutions/security/topics/codeptch.asp Microsoft's description of the patch and its installation,=20 and the vulnerability it addresses is posted at: http://www.microsoft.com/technet/treeview/default.asp? url=3D/technet/security/bulletin/MS01-033.asp Because of the importance of this threat, this alert is being made jointly by: Microsoft The National Infrastructure Protection Center Federal Computer Incident Response Center (FedCIRC) Information Technology Association of America (ITAA) CERT Coordination Center SANS Institute Internet Security Systems Internet Security Alliance -----BEGIN PGP SIGNATURE----- Version: PGP Personal Privacy 6.5.3 iQEVAwUBO2Wpgo0ZSRQxA/UrAQFQeQgAgmva53MJdjGF4u4oFXcAJICgf+1YTd1n IJ7XIPPjTFkc5/8Fqe0lbFY7ZeBNAvGGI276RPkebmTz1WAJ08MNe9uvMJAuyULw nOU8sMIO7S0Z5Z65/UYow0ui2qLVdmioqf809RAydHPdj1GINU0yDNS1HwwfjZia 0wBN+GjyjbdMU6bgMadoMdRgvCwdx2Jzr8ExAnFeNtLxRjwct3mv23bCrln1h80I 4awW0GPPd5iFzLIZX+QVh9/qkPdYm3SD1e8rs8GK69dub1AsVoKdXea+EHb3YckO 9XfuZdhxy6I+PnZJ8woSSNqtuZ2zKuS+q4kdPt0Abh0ToCbR4jK91A=3D=3D =3Da2a5 -----END PGP SIGNATURE----- ******************************************************************* You have received this e-mail bulletin as a result of your registration to the Microsoft Product Security Notification Service. You may unsubscribe from this e-mail notification service at any time by sending an e-mail to MIC...@AN... The subject line and message body are not used in processing the request, and can be anything you like. To verify the digital signature on this bulletin, please download our PGP key at http://www.microsoft.com/technet/security/notify.asp. For more information on the Microsoft Security Notification Service please visit http://www.microsoft.com/technet/security/notify.asp. For security-related information about Microsoft products, please visit the Microsoft Security Advisor web site at http://www.microsoft.com/security. |
|
From: Dot <do...@vo...> - 2001-07-30 20:38:04
|
Hex values are introdued with 0x .. like this ..
mov ax,0xf00
int 0x10
mov ah,0
int 0x10
I also wonder about the parse errors....
|
|
From: Richard <ri...@cc...> - 2001-07-30 20:11:12
|
Hi all. I need some help. I have some c source that I wish to compile, =
however I always get a compile error "parse error before '{' " and then =
for the next few lines " nondigits in number and not hexadecimal". The =
code which gives this error is as follows:
void clearscreen() {
__asm {
mov ax,0f00h
int 010h
mov ah,0
int 010h
}
}
Then further on in the program I also get "pares error before 'far' " =
for the following:
word portaddr(int n) { // base address of port LPTn
return(*(word far *)(0x00000408+2*n-2));
}
I can give the source to anyone who would like to examine it, if it =
would help.
Thanks,
Richard
|
|
From: <PRS...@cs...> - 2001-07-30 20:02:15
|
unsubscribe |
|
From: <PRS...@cs...> - 2001-07-30 19:58:12
|
unsubscribe |
|
From: jansb000 <jan...@wx...> - 2001-07-30 19:22:05
|
The error means that inside a conditional statement (like "if then =
else") the compiler has detected that one of the branches is not =
returning any value.
Note: If you use more return statements in a row, only the first one =
will be executed. Returning 3 variables in the way you do is not =
possible. Alternatives are:
- use a class or struct
- use separate functions for dd, mm and yy
- use system clock notation (dd:m:yy are coded in an unsigned long)
----- Original Message -----=20
From: Tre...@ao...=20
To: dev...@li...=20
Sent: Monday, July 30, 2001 8:31 PM
Subject: [Dev-C++] Class question
I am learning how to create a class and I need help. After creating =
the=20
class and compiling my program I get the following error.=20
warning C4715: 'Date::assignDate' : not all control paths return a =
value=20
This is my class. It is supposed to validate a date entered and =
display the=20
date on the screen. =20
#include <iostream>=20
using namespace std;=20
class Date=20
{=20
public:=20
Date();=20
int assignDate(int, int, int);=20
void displayDate();=20
private:=20
int month;=20
int day;=20
int year;=20
};=20
Date::Date()=20
{=20
month =3D 0;=20
day =3D 0;=20
year =3D 0;=20
} //end of default constructor=20
int Date::assignDate(int m, int d, int y)=20
{=20
month =3D m;=20
day =3D d;=20
year =3D y;=20
if (m >=3D1 && m <=3D 12)=20
{=20
if (m =3D 2)=20
if (y % 4 =3D=3D 0)=20
if (d >=3D 1 && d <=3D 29)=20
{=20
return m;=20
return d;=20
return y;=20
}=20
else if (d >=3D 1 && d <=3D 28)=20
{ =20
return m;=20
return d;=20
return y;=20
}=20
else if (m =3D=3D 4 || m =3D=3D 6 || m =3D=3D 9 || m =3D=3D 11)=20
if (d >=3D 1 && d <=3D 30)=20
{=20
return m;=20
return d;=20
return y;=20
}=20
else if (m =3D=3D 1 || m =3D=3D 3 || m =3D=3D 5 || m =3D=3D 7 || m =
=3D=3D 8 || m =3D=3D=20
10 || m =3D=3D 11)=20
if (d >=3D 1 && d <=3D 31)=20
{=20
return m;=20
return d;=20
return y;=20
}=20
}//end loop=20
else=20
cout << "Month does not exist" << endl;=20
//end ifs=20
} //end of assignDate function=20
void Date::displayDate()=20
{=20
cout << month << "/" << day << "/" << year;=20
} //end of displayDate function=20
|
|
From: Ioannis V. <no...@ya...> - 2001-07-30 18:43:00
|
<http://run.to/noicys>=20 -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Tre...@ao... Sent: Monday, July 30, 2001 8:32 PM To: dev...@li... Subject: [Dev-C++] Class question I am learning how to create a class and I need help. After creating the class and compiling my program I get the following error.=20 warning C4715: 'Date::assignDate' : not all control paths return a value This is my class. It is supposed to validate a date entered and display the=20 date on the screen. =20 #include <iostream>=20 using namespace std;=20 class Date=20 {=20 public:=20 Date();=20 int assignDate(int, int, int);=20 void displayDate();=20 private:=20 int month;=20 int day;=20 int year;=20 };=20 Date::Date()=20 {=20 month =3D 0;=20 day =3D 0;=20 year =3D 0;=20 } //end of default constructor=20 int Date::assignDate(int m, int d, int y)=20 {=20 month =3D m;=20 day =3D d;=20 year =3D y;=20 if (m >=3D1 && m <=3D 12)=20 {=20 if (m =3D 2)=20 if (y % 4 =3D=3D 0)=20 if (d >=3D 1 && d <=3D 29)=20 {=20 return m;=20 return d;=20 return y;=20 }=20 else if (d >=3D 1 && d <=3D 28)=20 { =20 return m;=20 return d;=20 return y;=20 }=20 else if (m =3D=3D 4 || m =3D=3D 6 || m =3D=3D 9 || m =3D=3D 11)=20 if (d >=3D 1 && d <=3D 30)=20 {=20 return m;=20 =20 These 2 are not returned. return d; =20 return y;=20 }=20 else if (m =3D=3D 1 || m =3D=3D 3 || m =3D=3D 5 || m =3D=3D 7 || m = =3D=3D 8 || m =3D=3D=20 10 || m =3D=3D 11)=20 if (d >=3D 1 && d <=3D 31)=20 {=20 return m; =20 =20 These 2 are not returned. return d;=20 return y;=20 }=20 }//end loop=20 else=20 cout << "Month does not exist" << endl;=20 //end ifs=20 } //end of assignDate function=20 void Date::displayDate()=20 {=20 cout << month << "/" << day << "/" << year;=20 } //end of displayDate function =20 =20 There are probably more errors too, but fix them first. =20 * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com <http://www.noicys.f2s.com/>=20 * Alternative URL: http://run.to/noicys =20 |
|
From: <Tre...@ao...> - 2001-07-30 18:32:11
|
I am learning how to create a class and I need help. After creating the
class and compiling my program I get the following error.
warning C4715: 'Date::assignDate' : not all control paths return a value
This is my class. It is supposed to validate a date entered and display the
date on the screen.
#include <iostream>
using namespace std;
class Date
{
public:
Date();
int assignDate(int, int, int);
void displayDate();
private:
int month;
int day;
int year;
};
Date::Date()
{
month = 0;
day = 0;
year = 0;
} //end of default constructor
int Date::assignDate(int m, int d, int y)
{
month = m;
day = d;
year = y;
if (m >=1 && m <= 12)
{
if (m = 2)
if (y % 4 == 0)
if (d >= 1 && d <= 29)
{
return m;
return d;
return y;
}
else if (d >= 1 && d <= 28)
{
return m;
return d;
return y;
}
else if (m == 4 || m == 6 || m == 9 || m == 11)
if (d >= 1 && d <= 30)
{
return m;
return d;
return y;
}
else if (m == 1 || m == 3 || m == 5 || m == 7 || m == 8 || m ==
10 || m == 11)
if (d >= 1 && d <= 31)
{
return m;
return d;
return y;
}
}//end loop
else
cout << "Month does not exist" << endl;
//end ifs
} //end of assignDate function
void Date::displayDate()
{
cout << month << "/" << day << "/" << year;
} //end of displayDate function
|
|
From: Dot <do...@vo...> - 2001-07-30 17:34:35
|
Hi, I wonder if it is possible to get the number of a socket, that other aplication created and uses. I need to use this socket as well. Tomas D. |
|
From: Ioannis V. <no...@ya...> - 2001-07-30 14:33:13
|
It compiles successfully in my dev-c++. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com <http://www.noicys.f2s.com/> * Alternative URL: http://run.to/noicys -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Chakravarti Mukesh Sent: Monday, July 30, 2001 10:04 AM To: dev...@li... Subject: [Dev-C++] (no subject) Hi, I am a new user of Dev-C++. The attach program is working fine using Turboc++ while using Dev-C++ although it doesnot show any error it produce various compiler and linker errors(I am also including them.). What is the cause? Thanks. |
|
From: Jared <sto...@ya...> - 2001-07-30 13:59:14
|
When I write a c++ program the pause function is automaticly included. How can I include this in a C program? _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |