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

How about the dialog class initiate network requests, sort of like client server where the dialog class is the client and network class is the server. The network class (server) should be able to communicate with any number of dialog class (client) objects. Its the dialog class which initiates all communications.

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

Regarding little or big endian, that can be solvable like this:

No it can't. The code you posted will work on all computers regardless of endianess.

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

Depends on the type of job you want -- you could start now applying for jobs that only require a BS or BA degree. That will give you some practicle experience while completing your masters. And that might open more doors for you with the company you are already working for because many companies like to promote from within before looking outside.

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

That error message ALWAYS means that you are not linking with one or more libraries. Are you trying to link with a library that was compiled with the compiler you are using? Each compiler has its own way of mangling function and object names.

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

As for alcohol it is true, for some people at least, that moderate usage will not lead to addiction to alcohol. If it did then I would have been addicted to alcohol many many years ago. The same is not true of tobacco.

As for the $65,000 house -- depends of course on where you live. In Los Angeles, California you couldn't get a dog house for that little. Almost as bad in Seattle, Washington. Modest homes around where I live run about $100,000 or so.

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

For anyone who may be interested this is a good article about tobaco and its ill effects. As noted in the article its not just the nicotine but hundreds of other deadly chemicals which poison every organ in the body.

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

Link your program with the libraries, just like you would like to any other library. Each version of Microsoft compilers does it a little differently. For vc++ 2010 do this:

Select menu Project --> Properties (at the bottom of the menu). Expand the Configuration Properties tab on the left pane. The expand Linker --> Input. On the right pane the first item is "Additional Dependencies". Add the library names there. Once that is done, select Linker --> General. On the right pane you will find "Additional Library Directories". Add the path to where the NOMAD libraries were installed.

Another option is to use a pragma inside one of the source files for your program #pragma comment(lib,"nomad.lib") Replace nomad.lib with the name of the library. Use multiple pragmas if you need to link with more than one library.

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

You will also have to install MySQL on your development computer because that also installs the *.lib files you will need with MySQL++.


>>2: Can you find what you're looking for by doing a quick Google search?
NO


Did you try this?

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

>> I tried to compile it with a C++ project, it was successfully compiled?

How would we know whether the compile was successful or not??? Your compiler will tell you that, all you have to do is read the error and warning messages.

>>Can you help me please?
Go back to where you got the source code and ask them how to do it. Its very unlikely anyone here will know anything about that.

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

If you smoke cigarettes, then you are addicted. Doesn't matter how much or how little you smoke. It only takes 1 cigarette to do the dirty job.

If you don't think you are addicted then stop smoking because there is no point to it and you will save some money too.

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

Because I like the menus better, easier to navigate, and I'm accustomed to it :)

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

You will get a lot better help by joining their OpenMP forums.

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

Ok, I'm going to pretend this is not just spam and put in my 2 cents worth. I quit smoking in 2001 after some 40 years. It was one of the most difficult things I have ever done, but well worth it. I tried patches but they didn't work for me, most likely because I continued to smoke while wearing them. Finally I just told my wife "enough is enough" and tossed the cigaretts away. I substituted things to eat, like carrots. I ate so may carrots my skin turned yellow. And I ate everything that wasn't nailed down -- gaining about 50 lbs.

Now I don't miss them at all, and have saved over $65,500 figuring today's prices ($6.00 per pack), or enough to buy me two new cars or a new house.

susheelsundar commented: Yay!! +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

IE8 all the way. I've tinkered with google chrome and ff, don't really care for either.

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

I would tak triumphost's approach. Start a new CLR/C++ Windows Forms project so that you can graphically design the form(s) the way you want them. That is a hell of a lot easier and faster than using pure win32 api functions. Then add in the code you wrote for that console program. How hard or easy that will be depends on the console program -- some may have to be rewritten to be integrated in with the CLR/C++ program.

NicAx64 commented: I'm still learning CLR/C++ I think it's a good technology,I'm with you. +7
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Where is function speedTest() being called? Add some code inside that function to make sure its being called. Also just comment out the loop on lines 7-10 to make sure that isn't causing a problem.

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

could it be a permissions problem? Does the program have required write permissions? Change the path of the output file to somewhere you know has ok permissions, such as your home directory.

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

You don't just go out and shoot a dragon. Dragons are very very difficult to kill, takes lots of time and requires a team effort of a lot of people. Your chances of getting burned to a crisp from dragon breath is pretty great. If you have ever played Dungeons and Dragons role playing game then you will know what I mean.

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

worked ok for me on MS-Windows 7 and vc++ 2010 express.

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

>>Most modern computers have little endian byte orders

No. MS-Windows and *nix are both different, and both modern operating systems.

>>Program should work on all systems, only thing I am sure is that I am reading 2 byte integers

Your program is going to have to be a bit smarter than just blindly assuming a certain byte order. The program will have to figure out which byte order is being used on the os and act accordingly so that it can read the binary data file correctly.

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

Or if you can find enough people interested in an Objective-C forum, Dani may be convinced to add it. ;)

And that's nearly impossible. I've tried for several years now to add a forum for MS-Windows c/c++ programming with no luck even though there are thousands of such posts in the C and C++ forums.

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

>>line 9: number1= buffer[0]+ (buffer[1]<<8);

Try this: number = *(short *)buffer; This assume sizeof(short) = 2 on your computer. There is no guarentee that is true on every computer.

That may not work either if the binary file was written in little endian format and you are attempting to read it on a machine with big endian format. More info about that in this wiki article

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

Yes, the first is a pointer while the other is not. Example

struct something
{
  int variable;
  // blabla
};

struct somtehing* ptr; // ptr->variable
struct something obj; // obj.variable
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

The error messages indicate you are not linking with one or more required libraries. I don't know which one(s) though.

Have you seen this thread?

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

Would you clarify your question because I don't know what you asked???

Scroll down to the section titled "Converting from wchar_t*". Pay attention to the functions that are used, especially wcstombs_s().

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

For Microsoft MFC CString to char*, see this post. Just use CString's GetBuffer() to get the pointer to the wchar_t*.

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

Become a Knight!;)

What makes you think Knights are wealthy? People don't become wealthy because they are Knights but are Knights because they became famous or wealthy.

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

See this thread for an example program. And see the tutorials in my previous post to learn SQL, which you will need with SqLite.

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

Naw, it won't do you any good to slay me because I'm too much of a pussycat.

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

Here are guidelines to become a knight. As I said before, to become a Knight you have to kill a dragon or something like that.

It pretty much starts and ends there for the prospective knight: how good can you swing a stick? You can be the nicest, most courteous and chivalric person in the world, but if you can't fight well then you won't be a member of the order [NOTE: the rule is �All knights are good fighters, but not all good fighters are knights.� There are exceptions to every rule, including this one; thankfully, they're rare.

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

By connector do you mean a library? AFAIK you have to have MySQL installed on your local machine in order to write c++ programs because that's when the header files and libraries are installed.

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

Oh nevermind -- just ignore my ignorant comment. Your solution is just too suttle for an old fart like me :)

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

You will have to do something knightly -- like slay a dragon or something. Or an entertainer, like comedian Bob Hope.

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

How do you get the length of an entered string using only stdio.h functions? Here's one option:

#include <stdio.h>

int main(void)
{
    char buf[21];
    int n, ch;

    while (scanf("%20[^\n]%n", buf, &n) == 1) {
        /* Extract and discard the trailing newline and any leading extraneous characters */
        do
            ch = getc(stdin); 
        while (ch != '\n' && ch != EOF);

        printf("Read %d characters with value '%s'\n", n, buf);
    }

    return 0;
}

It's a somewhat advanced use of scanf, but with the %[ specifier and a field width you can simulate gets without the buffer overflow risk. The %n specifier tells you how many characters have been extracted up to that point. The only standard functions called are from stdio.h. :)

Sorry Narue but all that doesn't answer the question about how to get the length of the string.

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

You are using nasm in MS-DOS mode (command prompt). Yes, they can not be used in win32 32-bit program. If that is what you want to do then interrupts are out of the question.

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

And your s2 definition is OK since you have it defined at 30. Dragon misread your code.

Yes, I read it as 20, not 30.

And strlen() returns the length of a properly formatted string.

But he is not allowed to call any of the functions in string.h. So strlen() can not be used.

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

All the funbctions you need are in int 21h. You can also use keyboard functions in int 16h, which are more flexible. Think of how you would use c language getchar() to get keyboard input and put it into a buffer. The same with assembly, using int 16h functions to get keyboard input.

int 21h has functions to either display a single chacter or a whole string (termiated by $ instead of '\0')

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

>>So value would be 0*10 + 49 - "0" = 490

Wrong. It's '0', not "0". Look up any ascii charact to see the numeric value of '0' is 48. Therefore the math is 0*10 + 49 - 48 = 1 . I don't know how you got 490.

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

I'd write a function that returns a random chracter. The function would have a loop that calls rand() to get a random number between 48 (which is the letter '0') and 122 (the letter 'z'). Now there are a few special characters between those two numbers, so you will want to check whether is is alpha-numeric by using the macro isalnum() found in ctype.h. If it fails the test then loop back and get another random number.

The calling function would do whatever it needs to do with that random character to format the string.

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

First, s2 is not declared large enough to hold 20 characters because it requires one more for the string null-terminating character.

What value is passed into the function for variable index? My guess is either an uninitialized integer or the maximum length of the string.

How to find the lengh of a string without using the functions in string.h? Count them yourself. All you need is a little loop that scans the string to find out where the null terminator character is at.

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

You don't. Header files are not linked. You need to study this link

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

To keep programmers from making dumb mistakes.

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

Is this for an assembly language class you are taking? If yes, does your teacher allow you to just call C library functions? That sounds like cheating to me.

line 19: what is the value of ecx?? You need to declare data for scanf() to store the results, just like you would have done in C languge.

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

sqlite is fine for very very small jobs. But so are just simple text files. For large jobs you will want an SQL compliant database such as MySQL of even MS-Access. In that case you will have to learn SQL (Structured Query Language) Links to tutorials here

Here is another tutorial geared specifically for MFC

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

You must be using a 32-bit version of turbo c++ that borland released a few years ago. If so then your compiler is correct. You can't use those header files with 32-bit compilers.

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

Sorry but I couldn't stand but more than 30 seconds of that.

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

That has got to be the world's largest book :icon_eek:

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

The US news is contradicting. One day say OBL used his wife as a shield and got killed. The next day they said OBL youngest wife rush as the soldiers and got shot in the leg. Which one is true. Is the military hiding something?

Both are true. OBL had several wives.

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

OMG. I was brosing the web and saw the news about OBL death. Apparently there is a fan club about him and one of his fans said that his historical hero is OBL and other terrorists. What do you guys think about him

There are two other threds about him. Lets not clutter up DaniWeb with more.

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

>>You can't nuke them all so give up on that idea.

Of course not -- the comment was made with fingure firmly planted in cheek.