Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

have you read these google links? MS-DOS is nearly extinct so you will probably have a very difficult time finding socket libraries for it.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

since it is a binary file

int numValidRecords = ???;
// write out the file
fwrite(&numValidRecords,sizeof(int),1,fp);
fwrite(&ph,sizeof(ph),1,fp);

// read the file
int numValidRecords = 0;
fread(&numValidRecords,sizeof(int),1,fp);
fread(&ph, sizeof(ph), 1, fp);

or

// write the file
for(int i = 0; i < NumValidRecords; i++)
    fwrite(&ph[i],sizeof(ph[0]),1,fp);

// read the file
int i = 0;
while ( i < 20 && fread(&ph[i], sizeof(ph[0]), 1, fp) > 0)
   ++i;
ankit_the_hawk commented: real help +2
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

why not just put the number of records in the file followed by all the records. Or just read one record at a time until end-of-file -- you don't need the number beforehand.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

>>#define M 100 *&^asdf
the compiler does not evaluate macros until used. If you coded something like below your compiler would complain bitterly at you int x = M;

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

>> for(i=1;i<=count;i++)
arrays start with 0, not 1. should be like this: for(i=0; i < count;i++)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Will Dani ever sell daniweb?

Of course -- for the right price. Bill Gates would probably sell Microsoft too if the price was right. Shoot -- I would even sell my mother-in-law for $$$ if you want her :mrgreen:

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

The trick is for each spouse to have a computer then go to a chat room and talk to one another. :eek:

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

There are valid reasons why someone would want to write a program in machine code

Only two I can think of
1) academic purposes

2) on obscure os that does not have an assembler

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
while((ch=getc(f))!=EOF)
 {i++;
  fscanf(f,"%d",&v[i]);
  count++;
 }

The above is reading the file twice -- the byte read by getc() is tossed into the bit bucket.. Better algorithm is

i = 0;
while(i < 10 && fscanf(f,"%d",&v[i]) > 0)
{
  i++;
  count++;
 }
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

anyone know the highest possible score when dealing one card at a time? I think I've come close with scores over 5000.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Its Microsoft os -- you have to reboot it once in awhile.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Score 66%, average error 89 miles. never was all that great in geography.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You can't do it with the floats or doubles in C/C++ language because of the way they are stored in memory. If you use C/C++ languages and want great internal precision then you will need to use some other math package that will allow it. myVariable.value may be unavoidable.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Here is a quick example and explaination of batch files. They are similar to scripts in *nix shell programming, but not nearly as powerful (or useful).

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

The people as codeproject.com seems to have answered your question quite adequately. I see no point in rehashing something that was already posted over there.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You want the address of a function?

int foo()
{
   // blabla
   return something;
}

// pointer to the function
int (*fn)();

// set pointer
fn = foo;

You can also get pointers to class methods. I have not used them so I'm not sure how they work.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

obviously doesnt do the trick :) i never use code tags......

Do you ever post code ? If not then I can see why you have no use for code tags. If you do -- then all I can say is shame on you :rolleyes:

arjunsasidharan commented: ; +2
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

its for windows 3.11

Do you still ride a horse & buggy to town too :eek: I know some people who do, but that's a different issue. I didn't realize Microsoft still supported that version of windows.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

EDIT: Oh, i know what ones you mean, you mean the ones that tell you to use code tags

Yup. That's it.:!:

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Do universities teach that any more? I thought writing programs in machine code went out in the early 1960s, before punch cards were invented.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

i got ie7 and have no watermark at all on this thread

It only appears on one of the development boards, like c++ or Java. I can't tell from the image you posted which board you were at the time you took that screenshot.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I use the Back button in IE5 and FoxPro all the time and have never had a crash. I don't use dial-up either, so maybe that is the problem.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

the ads dont show up under IE5 16 bit

There's a 16-bit version of IE5??:eek: If you are running any version of MS-Windows since Win95 you are running a 32-bit version.

But I've never seen any of those fly-by ads or those like Kevin posted , and I use both IE5 and FoxPro

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I see nothing wrong with his main() -- argc and argv parameters are optional.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Passwords are normally a string of characters, which could be almost any character you can type on the keyboard. An int is an integer that holds numeric information only. If you just want to type numbers and not letters then an int will probably be ok unless you type a number that is too big.

In your program, what is the difference between variables pass and password ? After entering password you are comparing it to an uninitialized variable pass. I guess pass is the correct password the user is supposed to enter, but it is never initialized to anything so it just contains some random number.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Here is one.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Only if you wrote the program blender and add code that will recognize and act upon those command-line arguments. If you did not write the program (or have the source code) then you are SOL.

You might be able to put some ms-windows commands in a batch file that would do what you want before running blender program, but I don't know what it would be.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Room& Room (const Room &node) {
     bool visited = node.visited;
     bool active = node.active;
}

The above is incorrect. It should be like this

Room::Room (const Room &node) {

>>Room::Room operator=(const Room& node) {
The operator needs a return value, like this:

Room& Room::operator=(const Room& node) {
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

you will have to be a tad bit more specific because there are millions of programs.:mrgreen:

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

enum is not a function but playsound() is. you should learn more about c language before attempting to use either. Almost all C tutorials and books will teach you about enum, but almost none of them will teach you about playsound() because it is specific to windows os.

[edit]Here is an example of how to use enum data type.[/edit]

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I try to read everything ;)

Anyway, I've deleted all my subscriptions except for this thread and set my notification back to 'daily'. So now I hope that someone will reply so I can test if it was a problem with the amount of subscriptions :)

Here's your reply. Hope it works.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Honestly Ancient Dragon, do you really have such a crappy monitor that you have to run your screen resolution at 800x600? :P
.

I have a nice almost-new flat screen monitor -- its not the monitor but my not-so-good eyesight even with glasses.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

CAN YOU BE ABIT MORE SPECIFIC ON THIS PLEASE? I.
.

Sorry, but you wouldn't understand even if I did post something more specific. Learn to crawl before you try to walk, and learn to walk before you try to run. When you know how to run then you will have little if any problems understanding how to do what you want.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

i dont see any watermark - what watermark?

I asked the same question a few months ago. If you go to the c++ board (or any of the other software development boards) and look at the "quick reply" edit box you will see some text in light grey color. That's a watermark.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I believe he's referring to the watermark in the editor .

I was too, but just didn't explain it very well. Its not a problem for me and I only have "good" eyesight. I don't recall anyone else complaining about watermarks.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

please post one or two lines of the file so we can see its format.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

>>Room& Room (const Room &node) {
constructors do not have return values. And you forgot the class scope operator. It should be like this:

Room::Room (const Room &node) {

>>Room Room::operator=(const Room& node) {

you forgot the reference operator in the return type

which line is line 44?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I would imagine dbase has an export command to export the database to a text file. Then you should be able to use Access's import command to import it.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Oops! Yes, I am wrong -- just found out from an expert in my office.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Cool. Yea that much I know. I should have been more specific. I want the details behind that operation.

I haven't the slightest idea what it does either. There must be explaination in your book someplace. :surprised

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Might be the settings on your computer. On my computer that text is very light grey letters, somewhat difficult to see. But I can understand how some people with sight problems might find it hard to distinguish between the light grey text and normal text.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

compressing files is a very complex algorithm. gzip is a free open-source library. Or if you want to spend the $$$ you can buy the libraries from pkware, the originator of the zip format.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

you can't boot up a computer remotely that has been turned off -- that would be a horrible security violation for all sorts of hackers and spammers.

Why don't you have each computer check at bootup time for the updates? Or tell your people to leave their computers on and just log off.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

its not a C# command. Its just illustrating how to run a demo program with the arguments. That is what you would type on the commond prompt window.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Back to the OP's question -- I doubt if he is using double or tripple buffering, just drawing on the screen as needed, which is why I said it would be too slow to erase the whole screen and redraw it.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I thought the ads are supposed to be IT-related. The ad at the top of the picture has nothing to do with IT. Also seeing some H&R Block ads.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Just saw some more spam :sad: See attached

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I don't know much about game programming, but I would think they actually use two (or more) screens -- the screen(s) being drawn is in the background then just flip screens when its time to display it. That way we don't see the flicker.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

:cheesy: :cheesy: :cheesy: you commented out all the include files:eek:

Nick Evan commented: Nice one :P -Niek_E +1
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

did you include windows.h? That's where BOOL and CALLBACK are defined.