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

with such a small amount of code how do you think anyone is going to know the answer to your question? But my guess is that the display() function is never called.

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

>>Did I do anything wrong?
Don't know -- why do you ask?

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

A priest, a minister and a rabbi went fishing in a boat. After about an hour the priest said "I'm thirsty", then stood up, walked across the water to a refreshment stand on the shore, then walked back to the boat. A few minutes later the minister said "I'm thirsty too", walked on the water to the refreshment stand then walked back. Finally the rabbi said he was also thirsty, but when he tried to walk on the water he fell in. At that moment the priest said to the minister "I guess we didn't tell him where the rocks were".

Maybe that's what this magician was doing.

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

Of course I'm sure -- I use those programs regularly. How else do you think *.zip files get created.

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

>>"An April 7, 2006 study, British Medical Journal, revealed that secondhand smoke increases the risk of developing glucose intolerance or diabetes.

Oh! First time I head that one and is possibly why I have type 2 diabetes today.

>>blah, those smoking fools don't know what they're talking about
Fools -- yes I agree. It is very foolish for people to smoke.

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

>> The program then looks for the 7th occurence of all phrases if they exits

I don't understand that one either. Did you quote the assignment correctly or did you just attempt to paraphrase it?

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

moved

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

Objects of type Personnel can not be converted to PersonnelNode because it knows nothing about the data and methods of the child class. Its a matter of inherentence -- PersonnelNode inherits from Personnel, not the other way around.

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

pass char** which is a pointer to a pointer, like this

void foo( char ** ptr)
{
   *ptr = new char[255];
}

int mian()
{
   char *ptr = 0;
   foo( &ptr );

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

Never hear of him, but this looks good

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

What gets banned next?

The next big ban-push is requiring resturants and fast-food places to remove all trans-fat from the food they prepare. That has already started in some states. Get a nutreation list from McDonalds and you will see that most of their food contains some amount of trans-fat. This will be changed in the future.

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

>. If you're in a restaurant and want to smoke then step outside. Is that fair enough?

No it isn't too much to ask -- nor is it too much to ask a non-smoker to step outside for a few minutes to get some smoke-free air when eating in a resturant that allows smoking. I don't see the difference.

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

>>lev = level(lev+1)
Ah yes -- but lev++ will not compile.

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

But what if I WANT to enter such a restaurant WITHOUT those consequences?.

Tough luck guy -- its your problem not theirs. I want to be a multi-millionaire too but Bill Gates won't give me his money. People don't always get what they WANT. Government making laws that bann smoking doesn't make the resuturants public. There are laws about that you can and can not do in your own home while your home certainly isn't public either.

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

But it isn't fair that I shouldn't be able to go to a public (yes it actually is public) restaurant

No, they are not public places, at least not here in the United States. They are no more public than any other store/shop/business. They only let you go into their business because they want your money. If the owners don't like you or your money they can make you leave. Wikipedia defines such places as "semi-public". The only public places are those owned by all the people such as government buildings and most (but not all) roads.

Whether its fair or not isn't an issue. If non-smokers want to go to a smoking business (whatever it is) then they are responsible for their own actions -- you know the air is unhealthy for you and choose to ignore that fact so you are responsible for your own actions. The same can be said for employees -- nobody says people have to work under those conditions.

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

I can guarantee that you have never misunderstood my posts. Typing like 7h1$ was "in" when I was 12. Not now. (For me, at least.)

Reminds me of a funny TV advertisement for some cell phone where the mother is angry at her (possibly 12 year-old) daughter for text messaging. All the girl could talk about was in myspace-style abbreviations (leet I think) and mother couldn't understand a word she said.

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

Why does a nonsmoker want to eat in a resturant that allows smoking? Only one valid reason I can think of -- a non-smoking spouse/child of a smoker, and in that case the smoker shouldn't take his/her family there either.

If you don't like the smoke then don't go there. Even when I was smoking there were some resturants I wouldn't go to because the air stank sooooo bad.

People don't have a right to go into any resturant -- that is private property not public property. Owners can bar you from their resturant if they choose to do so as long as they do not volate any laws, such as "No Shirt No Shoes No Service" signs I've seen.

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

Good luck on the test and have a great time in Chicago. Hope you have time to do some sight-seeing while there.

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

console program: WinZip, or PkZip, or gzip will do it.

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

>>how can i increase the enum type to go from freshman to sophemore etc.
with the assignment operator: x = sophmore;

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

Line 4: the next pointer in struct Book should be struct Book *, not struct node *

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

>Not letting something work is a good way of being paid for it again.
Not letting something work is a good way to go out of business. You don't seem to understand that if you break things in a new system that worked on the old system, nobody will want to use the new system.

Generally I would agree, but Vista is another matter -- there are lots of programs that will not run under Vista that worded ok with XP, including one of my favorate games -- Diablo LOD -- which will not be upgraded to work with Vista.

quintoncoert: As for MFC -- every time Microsoft upgraded it to a new version it became better and with more new features. Its vary rare that Microsoft removed a feature, but it has happened. I recently converted about 15 MFC programs from VC++ 6.0 to VC++ 2005 and only encountered a few porting problems that were unrelated to MFC. The only porting problems I know of is between platforms, such as porting a desktop application that runs under XP or Vista to a wireless such as Pocket PC or Microsoft Mobile 5.0. There are definite differences between those two platforms.

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

>> I haven't got any help on these methods
Sure you do -- just use google and see MSDN

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

Either you are dyslexic or you ought to change your spectacles. Or I missed the joke.
.

LOL: You're right, I misread it. Oh well, I'm glad I quit smoking 6 years ago because I feel a lot better now that I live in a smoke-free home.

WolfPack commented: I quit almost an year ago too. but the craving is still there. :) +10
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

>>PS: Like AD said the behavior is undefined or to be more precise defined differently for different compilers

ansii standards never ever, not even once, defined something for specific compilers.

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

(smoking!=party animal)

That's wrong for two reasons

1. Humans are 100% animal, there's no "partly" about it.

2. I have never seen another creature on this planet who smoked. Humans are the only creatures that do it, and we are supposed to be intellectually superior to all others :-O

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

Do you mean you want to a C program that will copy all the files in the folders you mentioned into another folder? That isn't very difficult if you using FindFirstFile() and FindNextFile(), then for each file found call the win32 api function CopyFile().

>>can somebody do an icon compiling console
Yes I can do it, but I won't. I've given you the functions you need now do the work yourself and post code when you have questions.

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

>>I really doubt this is working correct because if you run this program everything equals '-6' except the last line which equals 41 million.

its because the printf() statement does not have enough parameters. Count the number of %d's in the format string then count the number of actual parameters -- they are not the same to printf() is picking up garbage as the last parameter.

And the reason printf() displays the same value for all the parameters is because the program is using undefined behavior, meaning there is no guarentee when the compiler will save the result of each of those computations. It would appear that only the final result of x is getting passed to printf() for all the parameters.

Second problem: you have your compiler set for Release builds and you need to change it to Debug guilds. Select menu item Build --> Configuration Manager. set "Active Ssolution configuration" to "Debug" then rebuild the program.

>>Anyone else who have problems from his tutorial can post in this thread too.

Not a good idea because it will get too confusing. Everyone should start their own threads to ask questions

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

>>i saw this code in a particular book.....

what an awful algorithm to put in a book! I thought books were supposed to teach the language not how to obfuscate it. I think you should trash-can that book and get a different one.

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

Even many native-born English speakers have problems with the written language. I can't imagine how difficult it must be for others to attempt to communicate in some other language.

Aia commented: A little tolerance from others makes so much easier. Thank you. +5
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

No. here is one of many tutorials found with google.

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

>>Well I am writing a trojan right now...

We don't discuss such things here so I'm closing this thread.

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

>>I just lost mine a few days ago and my parents insist me on paying for it myself

Sounds like you have good parents -- teach you that money doesn't grow on trees and you have to be responsible for your own actions.

You might check with a local employment agency to see if there are any companies in your area who take on interns (for paid salary of . course)

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

I don't think you can, unless of course you add something to your program that will crash the operating system :)

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

The error indicates the program does not have a main() function -- maybe you did not create the correct type of project, such as you created a console project when you should have created a windows project.

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

>>2) Installing SparseLib++ library
The instructions seem pretty clear to me assuming you are on *nix and using g++ compiler.

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

The if statements on line 103 and others similar are coded incorrectly. Using || is coded just like using &&. I'm not going to waste my time correcting your work so I'll just post line 106.

if(a==19||20 && b==20 && c==20){  // WRONG
should be

if((a == 19 || a == 20 )&& b==20 && c==20){

line 103 can be coded like this:

if( a >= 0 && a <= 20)
{
  // blabla
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

read your textbook -- its probably there somewhere.

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

lines 27-36 are invalid variable names -- variable names can not be numbers. Maybe you just forgot to delete those lines ???

>>“Q” through “Z”, (where “Q” is 0 and “Z” is 9)
that is wrong -- if 'Q' = 0 then 'Z' must be 10 when I count them on my 10 fingers.

>>and the year as the letters “Z” through “A”
How does the alphabet wrap around from the letter 'Z' to the letter 'A' while counting forward ????
I think you need to recheck and verify you posted the instructions correctly. If you did then your instructor is pretty stupid person.

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

c-style character arrays can not be copied like you are attempting to do in lines 56-58. You have to use strcpy() to do that

strcpy(temp.w,myArray[i].w);
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I just compiled and linked your program without any error messages after adding pragma to remove warning C4996. So your problem must be that you did not set up the paths to the SDK correctly.

recheck the tools to see that you added the path to the platform sdk libraries correctly and that it is the first path in the list. If you left the path at the bottom of the list them use the arrow button to move it up to the top. Below is how mine is set up

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

I know nothing about it but I would think you will have to get the os specifications and assembly language requirements, then find out how to do inline assembly with your compiler. google around and you will probably find the information such as read some of these google links.

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

do you mean multi-threaded program? Its the operating system that does multi-tasking, not the individual program. How to do that depends on the operating system you are using.

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

>>Easter Sunday = March 22+D+E. (Note-This can give a date in April)

I probably mis-interpreted the result of the calculation in line 25. According to your instructions, easter is the month of March plus the caluculation in line 25. If the value calculated at line 25 is greater than 31 (because there are 31 days in March) then Easter is in April and the day in April is whatever was calculated on line 25 minus 31.

So, you do not need that huge if statement. But simply this:

<snip>
    int sunday = (22 + d + e);//The calculation of easter sunday.
    month = 3; // March
    if(sunday > 31)
    {
        month = 4;
        sunday -= 31;
    }
<snip>

Also, line 24 contains a bug -- should be % 7, not % 34 (see your original instructions).

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

the value of gear is getting changed someplace else. Post more code please

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

There is DirectX and OpenGL libraries, but I know next to nothing about them. I know DirectX makes heavy use of c++ features and the download file contains several example programs

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

Nothing is truly infinite :)

Oh, you mean like a circle is not an infinite loop? Maybe space is like a circle too, but don't quote me on that because I really have no idea whether it is or isn't.

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

Its not the compiler -- your program contains a bug line 13 -- change the data type to float and it will probably work as expected.

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

what compiler are you using? If its a 16-bit compiler such as Turbo C there is functions such as int86(). Or you can use inline assembly if your compiler supports it.

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

>>I remember posting a link to a really good, unbiased website

maybe this is one of them?