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

after reading the string from a text file to the encryption like I posted earlier. Do you know how to read files ? In c++ use the ifstream class to read a text file. Here is an example of how to read/write text files.

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

char data type is a small int whose value is between -126 and 127. So do do what you want just loop through the array and add 1 to the char value.

char str[] = "Hi blah blah";
// add 1 to the first character, syntax is idental to int
++str[0];
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

you will want to create an array, or vector, of strings.

vector<string> names;
<snip>
for(unsigned int i=0 ; i<numOfPlayers ; i++)
     {
           string name;
           cout << "Enter name #" << i << "\n";
           getline(name, cin);
           names.push_back(name);
     }

>>how could I access each one individually?
From the above vector: if n is an integer between 0 and the number of names in the array

string thisName = names[n];

There is another way to access individual members of a vector - using an interator -- but its a little more complex.

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

in that case just change line 9 to pass CButton.c_str() and it will compile ok.

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

line 6 does nothing -- delete it.

>>problem is that CButton needs to be a const char
No, it needs to be const wchar_t* because you are calling the UNICODE version of ShellExecute. You will have to convert c_str() to wchar_t* which requires another function to make that conversion.

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

you must use the initialization list version to initialize references. Otherwise I don't think there is a difference. I prefer the version I posted whenever possible.

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

Here is a good explaination.

doubles have greater precision than floats, so if you view the raw value of 0.7 a double might be 0.7000001 while a float might be 0.7000

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

Its just another way of initializing variables -- those could have just as easily been coded like this:

CDriveControl::CDriveControl()
{
     m_pPort = NULL;
     m_pSPTIDriver = NULL;
     m_bInitFlag = NULL;
     m_onlycomp = NULL;
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Wow, that's ridiculous!
They're talented!

makes me wonder if they somehow cheated :S

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

mmm how come we heard about that plot to blow up that american airport whereas you never here about terrorist plots against us , e.g the fertiliser bomb one. ;( maybe because were used to getting them they are less big of a new story

We did hear about the London bombings -- I just didn't associate it with 7/7.

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

I love nurses -- the ones I met when I was in the hospital are great and competent people. I don't think I have met a bad nurse, but I have met what I consider lousy doctors (quacks). I think nursing is the second-best profession in the world, only next to motherhood.

christina>you commented: That was encouraging. :) +15
Aia commented: That's it, Mr. Nice. Now you are going to get it. ;) +4
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Ok -- I'll bite -- what happened on 7/7? Was it something that happened in UK ?

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

My total score was 565,349.

I suck. :(

Wow! that was really fast :) Mine was 242K. But did you see the scores of the top 50 ? #1 was nearly 3 million :-O

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

Most IT jobs are never advertised. One place to look is a head hunter who charges the company not the prospective employee. You will probably have to get an entry-level job but with your education you should advance in your career faster then others with only a BA/BS or no degree at all. Don't expect to get rich quick, accept most any job for which you are qualified just to get your foot into the door.

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

Sounds like a good place to never visit :-O

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

.I understood C++ pretty well ,.

I hope you are smart enough to realize the coding style of the code you posted is just awful. Here are some tips, although they should not be read as if they are written in stone. Pay attention to the indention, placement of braces and hints about spelling. Making your code more readable should be your next goal before doing anything else.

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

The ability to unsubscribe from within the thread page was removed because it requires a large table scan on each thread load to check whether you are subscribed to the thread or not ... and the percentage of users actually unsubscribing via thread pages is minimal compared to the overhead of checking on every single page load.

Good move to help speed things up! :) I was wondering the same thing and now know the reason why.

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

I didn't have to bother reading it -- Josh said it all that needs to be said. There are people who would probably blaim Bush for Christ's second coming.

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

As you know,it's impossible to study C++ well without English.
Thanks ^_^

Probably because English has become the universal language of business. Anyone who needs to conduct business in todays global world needs to know English.

And the English you posted looks great to me. :)

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

Attempting to debug a WinCE program is really a huge bummer! What compiler are you using? Microsoft has made it a lot easier with VC++ 2005 Pro compier. The only way to do it with previous versions is put message boxes all over the place to display values of variables etc.

If your application uses MFC (Microsoft Foundation Class) then it becomes even more complicated. Don't get me wrong -- I love MFC and have been programming with it for several years, but it is very complex and takes about 6 months or so learning curve to learn it well.

If your program is pure win32 api functions then you should probably read the short tutorial here in order to understand how things work.

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

appears to be buffer overrun -- since you decided to start a whole new thread I can't see what you previously posted, and I'm too lazy to look. you need to post your code in THIS thread and not expect anyone to look in other threads for it.

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

What difference does it make how exactly it is done? The C standards do not dictate how its done so each compiler might do it differently. The characters are ultimately sent to the os and let the os display then on whatever terminal(s) happens to be attached to the computer.

If you really think you can read and understand the source code for write then you can get gcc version from www.gnu.org where they will give you free all the source code for their compiler. But be prepared for heavy-duty reading which very vew if anyone will help you.

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

Look in the file that declares fileHandle and find out what macro it is using to decide whether to use dllimport or dllexport. Then check your program to see if it had declared that macro someplace else.

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

CCeSocket sucks cannel water! Use normal winsock socket functions, just as you would on in a pc program.

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

don't attempt to jump ahead of what you know now, which seems to be nothing at all. Start at the beginng and work your way up. Some of the code and algorithms you will encounter may seem to be trivel or not relevent, but it really is. The Hello World program is only a bare beginning to what you will learn. No one learns to play the pinao by starting with Chopin or Beethoven and you can't learn to program by starting in the middle either. Read all the books you can get your hands on. There is a list of books and links at the beginning of this C++ board -- read the threads and take their advice.

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

With VC++ 6.0, select menu Project --> Settings, select the C++ tab on the right, change the Category selection to "Preprocessor".

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

what's happening is called stack overflow. Each recursive call required a little more stack space (or a lot more depending on how you wrote the function). Try to figure out how much stack space the function needs, add about 8 bytes for return address then multiply that by 22460. That could be a huge amount of memory.

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

>>float **a;
that is the declaration of a 2-dimensional array of floats. Somewhat similar to this when both dimensions are known: float a[2][5] Before allocating memory for the second dimension (5 in the above dimension) you have to allocate memory for the first (2 in the above example)

Line 18 is using an uninitialized variable a. You have to allocate the matrix like this:

a = new float*[o]; // allocate first dimension
for(int i = 0; i < o; i++)
{
    a[i] = new float(o);
    // initialize each element
    for(int j = 0; j < o; j++)
         a[i][j] = 0.0F;
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Narue -- I apologize for erroneously editing your post -- intended to hit Reply W/Quote and hit the edit button instead. So now your post is nonsense.

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

Enter the data as a string or get them from the keyboard one character at a time and check each character. You can use the macro isdigit() for that purpose.

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

first, create an vector of all prepositions. (I don't know if that is a complete list, but it is a good start)

Then read the file one word at a time and search the vector created above for the word. If the word read from the file is found in the vector then do something with it.

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

assuming you are using VC++ 2005, choose menu item Project --> Properties (at the bottom of the Project menu)

>>btw is their a serious problems that could happen if i just ignore the warning?
Don't know in your case, generally speaking ignoring warnings that can be corrected is a very bad thing because many warnings are really errors.

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

I never tried it but you might search MSDN for LoadIcon() and related functions. LoadIcon() loads the icon from a resource file which is attached to the .exe program by the linker so I think you will need to write an MS-Windows program to accomplish that. But there are other functions that will get an icon from another .exe program.

Maybe this will help.

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

dllexport can only be used in DLL, so I suspect your release version thinks it is compiling for a DLL. Check the properties for debug and release to see if something is defined in debug that is not in release, or vice versa. Sounds like the release version contains an incorrect preprocessor directive.

Covinus commented: this guy is daniwebs best poster +2
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

There really is no reason to buy a MAC.. And most people don't think so either b/c Microsoft has steadily dominated the computer industry for years..

For home use -- maybe you are right. But MAC still and always had the superior graphics capability

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

What they going to war with light sabres?
now that will be fun!
I cut u with light! ~ jumping while using a mystic power. Oh wait it's all done with green screens ~ boo

Don't laugh too hard -- many objects of science finction have become reality. The communicators in Star Trek are already in common use around the world, and we have had lazer beams for quite a few years too.

You can think of Russia as Dark Vador and USA as young Starbuck. Not sure where europe would fit in, unless maybe Palpatine

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

Here is another instance I have seen today where someone posts the same problem on multiple programming web sites. That deminishes the probability you will get the answers you want and increases the probablility that you will get the same or conflicting answers.

Also, you posted the description of the program but no mention of the problems you are having. We can not help you very much if we have to read your mind.

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

Anothere difference: defines can be changed but const can not. Anywhere in your program you can redefine X to be anything you want, including a string. You can not do that with a const int.

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

Oh! I see you are spamming all the programming web sites with this question :@ I've already seen the answer on another site so won't bother with an answer here.

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

In *nix you can use curses library which allows you to put characters on the screen in random locations. I also did it over 10 years ago using termio but I don't remember how I did it any more.

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

I'm listening to a Moody Blues concert on PBS that was recorded in 2000. Great stuff if you like music of the 1970's and 80s. They were the first group to integrate a full orchastra with rock and it sounds great. I don't know if any other group has ever done that.

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

I have the latest Platform SDK. I created an MFC mdi program using VC++ 6.0 so that it will generate the include files needed in stdafx.h then copied those into the stdafx.h that was generated by the VC++ 2005 Express. It compiles ok but will not link because it can not find nafxcwd.lib. The only place that file is located on my computer is in

C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib\AMD64 

and
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib\IA64

I don't think it should be using either of those libraries because isn't the 64 in the path for 64-bit programs?

Its quite possible VC++ 2005 Express can not use the same set of MFC includes that VC++ 6.0 used even though the value of _WIN32_WINNT is set to 0x0501

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

And also, not to make fun of anyone, but when you said "... and I believe that's because mac has allways had his spicific hardware..." did you actually mean his specific hardware? Because Mac isn't the person who invented Apple/Macintosh computers, Steve Jobs and Steve Wozniak are, and Mac isn't a person at all (although, like most people, Macs tell you that you are dumb, and also, treat you like you are dumb).

almost everyone makes grammatical errors from time-to-time. You just have to learn to be a little less picky about it and accept the fact that not everyone is an English major in college. :)

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

>>Please correct my source code.
Impossible for us because we don't have the hardware and there is nothing in the code you posted that indicates any obvious coding flaws. You need to learn to use a debugger and step through the code so that you can see what it is or is not doing. If that isn't possible then ????? (I have no clue)

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

Well then you must be gifted.

or flunking;)

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

Ancient Dragon. I seem to recall that you mentioned once that you came to the world of programming being fairly mature.
I am not as old, but old enough to think that schooling might not be a solution. Is there any hope for a hobbyist like me, to someday get a entry position at coding.
What's should be, if any, the realistic goal I should persue?. Any comment?.

When I started out in 1985 the computer programming field was wide open. There just were not that many of us so it was not difficult to find jobs. After I retired from US Air Force I bought a book, cheap computer and began practicing. A couple months later I landed an entry level programming job at local temp agency and things went on from there. Now, however the field is flooded with programmers and companies can hire them a dime a dozen.

Your goal should be to make yourself stand out above the crowd. To do that you need all the education you can get -- a bachelors degree is desireable, masters is better. Ph.D. not any good at all unless you want to do research for some university or company like Microsoft -- way over qualified for most programming jobs.

Most entry level jobs today require either a college degree or a lot of experience. If you are under 50 years old with little or no practical programming experience I would strongly suggest getting your rear …

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

Mac:
Treats you like a moron. Too many graphical effects.

That's enough to convince me -- I'm buying a Mac tomorrow! :)

Not fully open source.

I could care less -- I don't want to read or change the source code.

Windows:
Everyone uses it. Not open source. Against choice.

Again, not relevant arguments. Just because everybody uses it doesn't mean I shouldn't too.

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

certifications were never intended to be a substitute for a college education or practical experience. Knowing nothing about either candidate I would always hire the person with the experience and proven track record over one with just certifications and no experience. The person with certifications might be hired for entry-level position but the person with experience would be hired for a position well above entry level and consequently receive a better salary.

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

Computer networking -- allowing two or more computers to talk to each other via serial ports or ethernet cables.

Computer Science: the study of computers and how they relate to people. That's a terribly broad description because there are many many specializations you can study.

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

reackon i could put daniweb down as work experience on my university application? im going for a computer networking degree

You are now an experienced poster, if that counts;)