Isn't once we use open(..) function to open the ifstream file will automatically place the file pointer to the beginning?
ifstream inF("file.dat", ios::in | ios::binary);
for (;;) {
inF.read((char *)&num, sizeof(int));
if (inF.gcount() == 0)
break;
cout << num << endl;
}...
Most of the time i need to view about 4 application windows simultaneously, but a single monitor makes uncomfortable for this usage. I'm not afford to buy another computer (CPU..) but another monitor
Is it possible to use more than 1 monitor with a single computer (CPU, motherboard)?
I wanna write a program that storing the following struct of data into the binary file:
struct staff {
string id; // maximum 8 characters.
string name; // maximum 35 characters.
string ic; // identity card number, maximum 14 character.
unsigned short age;
string remark; // no...
I have a excel files which locked by my colleague with password, which prevent me to open it, how to break for password, or is there any alternative way?
Normally the file deleted in Windows just away from sight, the storage still occupied for the deleted file.
How can we make sure that the file is absolutely deleted (impossible to recover) and save space?
I saw someone created a report which, in a single page, he can make several tables with the different width and number of cell in a table.
Such as table one, 4 columns, each column's width is 4.57, Another table has 7 columns, each columns's width is 6.23, etc.
How to combine tables with...
I tried to use the workspace to minimise the time to open all the source and destination
workbook to make it looks good. But another problem found, the size and order etc of the
workbooks won't be saved every time i save the workspace. And I've set the split and freeze
panes in the worksheets...
I've a workbook that link to other workbook in a formula. When i open the destination
workbook without opening the source workbook the result of the formula is #value!.
It looks correct if both the source and destination files are opened at the same time.
Every time power failure occurs, the Bios halt at the error message screen saying:-
BIOS V4.0
0061 CPU Clock Mismatch
0072 CMOS Checksum Error
0006 Equipment Configuration Error
Press Ctrl_Alt_Esc key to enter Setup or F1 to continue...
What's wrong?
normally when the taskbar is in default size at the bottom, it'll only shows the time and other items.
when i resize it the make it heighter, the day of the week shown, how can i hide that day of the week? i just need the time?
Can't initialize the variable a, why:
#include <iostream>
using namespace std;
typedef struct {
string a, b;
int c;
} T;
int main() {
T a = {"a", "b", 5};
}
The following error & warning messages appear:
Error E2291 test.cpp 11: } expected in function main()
Error E2034 test.cpp 11...
When I use the blink from conio.h, the text doesn't blink, even after I switched it into full screen.
If I run from command prompt in Windows XP, I've to open and closed instantly to make the blink text blinking. Why it doesn't blink all the time in full screen, how to get it work?
I'm using the following to send output to printer:
FILE *prn = fopen("LPT1", "w");
fprintf(prn, "Line 1...");...
How to change the font tyre and size for the output? Thanks.
I've just clean reinstalled Windows XP SP2, everything is fine but sound! I've tried the Device Manager and check the sound components, all of them say working properly.
I'm sure the speakers are connected to the computer, because the speaker's light is on, and produce little sound when I turn...
I've just clean reinstalled Windows XP SP2, everything is fine but sound! I've tried the Device Manager and check the sound components, all of them say working properly.
I'm sure the speakers are connected to the computer, because the speaker's light is on, and produce little sound when I turn...
I'm using Windows XP SP2, my hard disk has been splitted into 2:
c: (ntfs, containing windows)
d: (fat32, containing user files)
In c:, I can make the files private from other users by putting the files into my personal folder. I've put some shared files in Share Documents folder and d:, but...
I've just downloaded and installed Visual C++ Toolkit 2003, window.h can't be found in include folder, can I build win32 program with it? I didn't write win32 application to test it yet as I don't know how to, but I like to know whether I need to download and install extras to build win32...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.