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

unknown file type -- my computer doesn't know what to do with *.com files.

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

PAE does not have to do anything with Heaps.

Only in that the heap can not access memory beyond the 4 gig boundry.

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

I am not sure how it use to work in 16 bit DOS but I am sure this is how it works in Windows Vista ! :)

Link please. No version of Windows since NT 4.0 have had segmented memory. The segment registers do not contain segments -- they contain descriptors.

>>you can have maximum 64 segments
Then why can I allocate as much memory as I want at one time up to the limit of size_t and size of RAM + hard drive? The 32-bit version of Windows can address up to 4 gig of physical RAM.

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

Psychology is the easiest damn subject available for study at most schools. Everybody knows that.

Yes it probably is at the undergraduate level. Like learning mathametics, most people can't learn calculus without first learning how to add, subtract, multiply and divide two numbers. I suspect (hope) there is a lot more to phychology than what you get in phyc 101 class.

As for the parents problem -- many kids are bad like they are because the parents just don't give a rats ass what they do. The parents are worse then the kids -- spaced out on drugs, alcohol, or both. Many women today are little more than baby factories. Being a black child is very difficult in America because of all the drugs and violance in black communities. And rap music, whether good or bad, expresses those problems.

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

you could just use a while statement

void pop_back(const T& t)
{
    // Deallocate memory pointed to by tail
    delete tail;
    tail = NULL;
    // Get new tail
    node<T>* currentNode = head;
    while(currentNode->next != NULL)
    {
             tail = currentNode;
             currentNode = currentNove->next;	
    }
    if( currentNode == head)
    {
          head = tail = NULL;
    }
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

pop_front is wrong. First you make a copy of head then delete it. When you delete head that also invalidates the copy tempNode. What you want to do is set head then delete tempNode

What are you going to use that parameter for ?

void pop_front(const T& t)
{
    if( head != NULL)
    {
        node<T>* tempNode = head;

        // Get new head
        head = tempNode->next;
        // OR just this
        head = head->next;

        // Deallocate memory pointed to by head
        delete tempNode;
    }
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Welcome to DaniWeb. Hope to see you around alot in the Tech Talk boards because we need experts like you to teach dummies like me about hardware problems. :)

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

Its nice that you used code tags but you really should have formatted that code better before posting it. No one but a big masochist is going to read through all that stuff.

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

what does multithreading have to do with broadcasting packets on a network ? I assume you want to use sockets

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

If someone doesn't know the meaning of a term such as "DHCP" then just use google to look it up. Of course that implies the person knows enough about computers to use google. I didn't know what DHCP was either until just a few minutes ago when I googled for it -- there are lots of good references to it.

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

I saw the problem a couple times when this thread was first started but not since then. IE7 on Vista Home if anyone really cares.

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

>>Your heap is divided into segments you can have maximum 64 segments <blabla>
That also is implementation dependent. I think that is how it works in ancient 16-bit MS-DOS but things have change just a tad since the 1980s. Memory is no longer segmented like that.

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

>> it doesn't work
What exactly does that mean ? And post your most recent code because the code you originally posted doesn't do anything at all.

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

hi...
i want to get local time stamp in format mmddhhmmsshh where last hh gives the hundreds of seconds.
if you have any idea reply me.
regards
wijitha

The functions in time.h will not give you milliseconds. For that you need to call other os-specific functions. For MS-Windows you can call the win32 api GetSystemTime() which fills in a structure for you and, on most Windows systems, will give you milliseconds. After you call that function you will have to format the information however you want it.

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

>>Google-image search "Salem" for small pictures. Daniweb is the first hit.
I must be doing something wrong because all I get is links about Salem Mass. and witch trials.

Or this page

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

you have to put all that code in a main() function

// includes go here

int main()
{
    // code goes here

   return 0;
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

windows tutorial

>>The problem is that I can write a programme in C and then run it but it does not produce an .exe
It won't if there were compile errors. Make sure your program compiles iwth 0 errors and 0 warnings.

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

ban rap music ? No, just clean it up, and it should be the music industry, not the government, that does it. Afterall TV stations wouldn't show Elvis below the waste either because of his lewd shaking of the legs :) In 20 or so years from now today's rap music might be seen in the same light as we now view Elvis's behavior -- complete laughter.

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

ermm one more question

how do i convert the string 'balance' into a int/double which can do algorithms and vice versa?

Why are you using balance as a string anyway. It should be declared as an int and then ifstream will do all the work for you.

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

see the functions in time.h -- such as time(0) will return the current time in seconds since 1970 (or something like that). Then localtime() will convert it to a structure tm. There is also a gmtime() that converts the time(0) to GMT instead of local time.

Salem commented: Nice succinct answer +12
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

>>how to declare customer as a string and balance as an integer
Doesn't matter because ifstream will convert what's in the file to an integer.

>>while( myfile >> acct_no>>balance)
You can NOT use acct_no in that line because ifstream will destroy the value you type from the keyboard. That's why you need to use a different variable as I suggested before. Then in that loop you have to compare acct_no to customer (or whatever variable name you want to use) to see if they are the same. If they are the same then perform the operations you stated in your original post.

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

>>no the weighing device is not directly connected to the pc, but it can be attached directly to the pc with serial port
That doesn't make sense. If the scale is not attached to the pc then how can you get the data from the serial port? And what does the absense of a disk drive have to do with anything ? Just get the information from the serial port and write it out to the monitor using standard printf() statements. If you have to put the information in existing fields on the screen then you will have to learn how to move the cursor before printing. Exactly how to do that will depend on the operating system. The most portable way will probably be to use curses library in *nix or pcurses port in MS-Windows/MS-DOS.

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

assume customer is a string and balance is an integer then just loop through the file until the customer is found. The loop will stop after all the file has been read.

while( myfile >> customer >> balance)
{
   // blabla
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Thanks for that link :)

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

win32 api CreateDirectory() to create a directory. To delete a directory you first have to delete all the files in it. FindFirstFile() and FindNextFile() will find all the files. Use it to create a linked list of the filenames then delete them one at a time.

Those suggestions will probably take you a few days to write, unless you are very good programmer now in which case you might do it in a couple hours or so. After that, come back, post the code you have written and we'll help you out some more.

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

The most offensive TV ads are about ED. I don't know what happened but just a few years ago those ads would not have been allowed on TV.

Then there are the ads that leave me wondering what it was they were advertising. I watched the entire ad and never did figure it out.

Finally the quantity of ads. During commercial breaks I've counted as many as 20 consecutive ads. I don't know why they bother with so many -- I've read research that indicated people can only tolerate a couple ads before tuning them out altogether -- in otherwords the advertising companies are just tossing their money to the wind for showing all those ads at one time.

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

what compiler and operating system ?

>>Sorry for any bad english, it's translated text.
Looks ok to me. :)

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

Yes, you need to add more comments -- everywhere. First you need an explaination at the top of the program to tell us what the program is supposed to do. Even "glancing" at main() I don't know what it is trying to do.

If in doubt -- comment it.

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

Trust me this is the most difficult API to learn and implement I have seen in my carrier!! (I may not be true with you) !!

Will have to learn ‘Impersonation’ as well to use this API effectively. You may go ahead and learn Kerberos protocol to understand how does domain login system works in Windows. IT IS VERY INTERESTING AND CHALLENGING.

I think Microsoft made it very difficult for good reason -- to help keep hackers out of the system :)

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

land a tre

Huh? :?:

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

my favorite is Narue's -- probably fits her personality very well :)

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

Wow, sos that was horrible.
|33t? It's 1337 dude. Pipe (|) is an I. And if you didn't know all the 1337 letters to that word, why didn't you just type leet? 0|-| /\/\'/ 90|)
7|-|47 5|_|<|<5 73|-| |\||_|75 |=0|2
j00!

What the hell is all that crap :-O I'm sure glad I learned English

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

you have to make the function yourself. Is it a GUI program? If it is then just make a dialog box with the login information. If not then just print out the text and get input just like any other console program. The more difficult part will be how to verify the login information. Professional programs store user ids and passwords in encrypyted form either in simple text files, a cookie, or a database

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

This is what we mean by inline functions in the header file

class Vertex {

public:
	Vertex() { x = y = z = 0.0; }
	~Vertex() { }
	float getX() { return x;}
	float getY()  { return y;}
	float getZ() { return z; };
	void setX(float newX)  { x = newX; };
	void setY(float newY) { y = newY; };
	void setZ(float newZ) { z = newZ; };

private:
	float x, y, z;

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

The code you posted a week ago is obviously not the same code you are using today. So post code (I can't see your monitor very well) and zip up the data file and post it too. stramp is case sensitive so maybe the string that's in the data file is not the same case as the string you want to compare. To do a case-insensive compare you can convert both strings to either upper or lower case before calling strcmp(). Some compilers have a case-insensitive compare function, such as stricmp() in Microsoft compilers and compareNoCase() (or something like that) in some other compilers.

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

I've seen that several times before -- very interesting how we can read words whose letters are mixed up as long as the first and last letter are correct.

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

I saw that a couple times this morning too. The last time I saw it Dani said it was a corrupt file. But she probably won't do anything about it until after she upgrades DaniWeb to the newest version of vBulletin, probably sometime Christmas Day.

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

gets() ignores spaces too :)

Use the >> operator to ignore spaces cin >> word;

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

Merry Yule to one and all (a Pagan seasonal greeting...)

Does that mean you're a pagan (whatever that is) :)

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

Do you mean that I can send a value from a function written in one language to the main function written in another language using sockets? I'm new to the concept of sockets.

That's how the internet works -- its all done with sockets. Two programs running on the same or different computers can communicate with each other via sockets. And as explained by ssjarish it doesn't matter what computer language the programs are written in as long as that language supports sockets.

Jishnu commented: Thanks :) +2
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

>>This, was working till i changed the input style. From gets to cin.get
gets() was wrong to begin with. and cin.get() does not do the same thing as gets(). What you probably wanted was cin.getline() or std::getline().

BTY I fixed up the code tags in your post. [icode] is intended for only one line of code so that it can appear on the same line as the describing text.

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

Happy Holidays everyone, even to those who don't celebrate them :)

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

That problem has nothing to do with the compiler you are using. On line 37: when you enter a numeric value cin will not remove the <Enter> key from the keyboard buffer. You need to strip that out. One way is to call cin.ignore() after line 37.

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

I would rather prefer to carry her and walk around the puddle. Much classy and saves my coat. :-)

She will give you a nasty black eye (at best) if you don't know here very well, or at all.

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

I don't know -- I always use the IDE. But I do know its a lot more complicated than simply putting cin.get() at the end of main().

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

When you compile using the command prompt you first have to open a command window. That window doesn't disappear after compiling or running your program.

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

Why does the list include posts that I made just a few minutes earlier? Shouldn't those not appear in the list ?

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

Lets not turn this thread into a flame war on religions. I think this is an interesting thread so don't spoil it by going in that direction.

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

First, thanks for taking the time to read the rules about code tags :)

>>By the way, how come code tags aren't working properly... Shoulden't this be numbered now
you have to add the language like this:

[code=c++] // your code here

[/code]

>>Unfortunately, when I use this button, after the program is finished, the command prompt automatically clos
If you want the program's window to remain open after the program finishes then you have to add another line just before main() returns to prompt for keyboard input so that the program will pause at that point.