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

Replace with NULL to indicate it has no value, assuming the field is allowed to have NULL values.

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

You have to add 1900 to the year.

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

which part of that don't you understand? Were you paying attention in class when your teacher explained it to you?

rubberman commented: Like your new avatar AD! :-) +12
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I have two cars, one white and one wine. My grandaughter's car is canaru=y yellow.

can't wait to be 16.

It's not all it's cracked up to be. One day you will blink your eyes and you will be 70.

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

yes, lots of times

have you ever shoveled sunshine?

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

granted but you spent it all in Los Vagas on wine, women and gambling.

I wish I could ride a motorcycle

<M/> commented: Yep :) +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

for(i=1 ; lam > 0.002 ;i++)

That looks like a very very dangerous and unpredictable loop. What happens if the value of lam is never > 002? Or if the value of lam becomes > .002 only after the value of i is greater than 400? You need to rethink what that loop is doing.

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

Are you using Visual Studio IDE? It has two ways to compile program: Debug and Release. The Debug project adds a great deal of data (such as a symbol table) to your compiled program to make it easy to debug. This is great if you need to debug the program, but not very useful when you want to give your program to someone else. Before you give the program to someone else you will want to compile for Release mode, which strips the excecutable of unnedessary stuff and optimizes the code (loops etc) to make the program run faster.

Microsoft Visual Studio IDE will place the compiled program in a folder named either Debug or Release, depending on which compile mode you have chosen. This folder is created in the same folder as where you place the source code for your program. When you give your program to someone else you can put the executable anywhere you wish, such as in c:\Program Files\MyProgram or somewhere else.

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

Nice advertisement for a program Don probably doesn't want. Next time try posting something useful.

@Don: MS Sql Server accepts several different data formats, here is a list of them.

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

cold and raining since yesterday.

<M/> commented: Lucky... +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

persistence

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

I saw on CNN today that in California, just a few miles north of LA there is a raging fire that has burned over 6,500 acres as of about 2 hours ago (story here). They have what is called "Santa Ana winds", which is very strong wind caused by surrounding mountains.

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

I mean I'm all for being elitist, but I think that the creating the distinction between 'programmer' and 'scripter' is futile and meaningless.

Did you bother to read the link I posted? Nothing eletist about it, would you call an electrical engineer a programmer? Of course not.

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

You need to set all the elements to NULL after calling malloc(), such as like this:
memset(lines->list,0,num_elements * sizeof(char*))

or call calloc() instead of malloc(), which will do it for you.

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

HTML, XML, CSS, etc. are not programming languages, they are markup languages, so people who use them are not programming. Instead they are writing scripts for a browser to interpret. This seems to be a good article which discusses the differences between markup and programming languages.

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

Nice piece of science fiction. Do you beleve everything you read on the internet? That first link presented not one schred of evidence to prove the allegations. I'm not saying they are false, just unfounded and unproven. I could have written that fairy tail too.

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

Similar to Reagan's people convincing Iran to hold on to the hostages until after the election.

Proof??? This is the first time I heard that conspiracy theory.

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

which were close to ending the Vietnam War in fall 1968.

We all know that "close" is next to meaningless in politics and peace negotiations.

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

A war that went on much longer than necessary thanks to Nixon's behind the scenes antics in order to defeat Johnson.

You had a lapse in memory maybe? Nixon never defeated Johnson because Johnson didn't run for a second term.

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

Her legacy will be that Independence for Scotland and Wales will be a reality decades before it would have been otherwise. I

And is that a bad thing?

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

obvious improvements make Windows 8 a strong contender

The only "improvements" I've seen is boot-time speed, it boots considerably faster probably because the kernel is smaller. Otherwise there is no reason to downgrade from Windows 7 to Windows 8.

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

And the Republicans, after gerrymandering their way into a congressional majority have proposed changing the rules for the Electoral College to get a lock on that as well.

I don't worry about that, over the past 200 years there have been more than 700 proposals to change it, none of them succeeded. (link)

Reverend Jim commented: Cool new avatar. +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

What is the error?

Line `14 is incorrect -- remove the & pointer operator because character arrays are always passed as pointers.

You can delete line 17 because when the file is opened the file pointer is already at the beginning of the file, unless you use one of the open flags that sets it at the end of the file

line 32: why are you deleting the same character that was just read on line 31??? Move line 32 down outside the loop.

Even after you correct all the above it probably won't work in some cases. What happens if the string it is looking for is "John" but the string in the file is "Johnson"? That case will produce a false positive. A safer solution is to read an entire word from the file then compare the two. Instead of reading the file one character at a time all you have to do is call fscanf(fpcust,"%s", temp); which reads the whole word. Then delete lines 29-33.

delete line 39, no need to flush the stream at that point.

delete line 52, no reason to change the file pointer. The file pointer is already at the next position in the file. And it won't ever get executed anyway because the program will exit immediately after the first comparision due to the previous two exit() function calls.

line 54 will also never be executed for the same reason that line 52 won't.

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

Read an online tutorial that teaches you how to read text files. Once you understand how to do that the rest is simple (just add each line to the list box)

Maligui commented: Teaching them how to fish. Nice work. :) +3
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Congress is not going to change that loophole either. They aren't going to make people do background checks to privately sell a weapon to someone else. I saw that issue discussed on CNN a while back.

How much safer were these children because the family had more guns?

No amount of gun laws are going to prevent those tradegies. The only possible way to do so is to disarm America, and that will happen when Hell freezes over. Americans are not about to give up their guns for any one or any government. Just try and there will be a huge blood bath.

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

Testing

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

until now Baltic Sea is full of mines and (even) chemical weapons, left by Germans.

I was in Baltic Sea just a few years ago (maybe 10 years ago) on a USA flag fising factory ship doing some work for the company I worked for. We were about 200 miles from Alaska shore, no one mentioned mines in the water. Perhaps they are just on the Russian side of the sea???

@AD, you must have been a pretty young father when you had him

I was 21, my wife and I had been married almost 2 years. We stayed married until she passed after 49 years, 1 month and 11 days.

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

Unless you buy the weapon at a gun show

What's why I said "almost"

Kaufman County District Attorney Mike McLelland and his wife, Cynthia were murdered in their home

That unfortunate incident could have happened anyway. But there are lots more where armed women have shot and killed an assiliant (I like stories with a happy ending).

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

we as a family could not afford to go on vacation some years, while a family on social security flew out to Spain or Italy 3 times a year for a 2-3 week stay in a luxury resort?

So what? Maybe that person on social security wanted intil he/she was 65+ years old in order to afford taking that vacation. Don't you think he/she disserved it? I'm on social security and I resent your impression that we old people have not worked for 50+ years to get where we are today.

There are a few people drawing social security who don't need it, the really wealthy such as Senitor John McCain. I think congress will eventually stop that for wealthy people.

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

Automobiles serve a much more useful purpose and are much more heavily regulated than guns. Would you agree that regulating and tracking guns to the same extent would be a good idea?

To my knowledge guns are already more heavily regulated than driver's licenses. In USA you (almost always) have to have a police background check in order to buy guns, that's not true of driver's licenses. And just like guns in the hands of criminals there are a lot of people driving around without driver's license.

We just had two innocent people in my city killed by criminals supposedly taking potshots at each other.

That happens all too often here in St Louis MO too. Bullets penetrate the walls of houses to kill a small child watching TV. Other than that, I don't care if criminals shoot each other. Gangs are big in St Louis, which makes St Louis one of the most dangerous cities in the USA.

So your argument is "criminals don't obey the laws anyway so why bother".

No, that's not the point. Police have to have the laws in order to make arrests, can't arrest someone for doing something that is not illegal. Just don't expect criminals to pay any attention to the laws. Making a law to ban knives is not going to stop anyone from buying a knife.

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

That's hardly what one could call a valid source of information. How many of those were reported multiple times for the same death? No way to know because anyone can report deaths via twitter!! Since when did twitter become an authority source for anything?

Even if it were true (which I doubt), how many more deaths have occured buy automobile accidents? Or by other causes? Am I alarmed at 3530 gun deaths? Hell no. We in us need more guns, not fewer.

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

Shouldn't his account be retired? He passed away a couple years ago, I think it's time for DaniWeb to retire his account and move on. I see his name in such places as Endorsements, which don't really mean anything for him any more.

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

My son was also born in 1964 :)

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

From what I've seen MAC is a pretty lousy operating system, my friend has one that crashes constantly. The more I use Windows 8 the better I like it. Windows 8 boots a lot faster than any previous version. Ubuntu boots even faster, but a lot more difficult to learn and use then Windows. The last time I heard *nix was the best os for servers (out performed Windows). So which is best depends on what you want to do with it.

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

I have to submit a C project tomorrow

It's unfortunate you wanted until the last minute to do your homework. I wounder if your teacher will know you didn't write that code?? What you are attempting to do is called plagiarism and not looked upon very kidly by educational institutions.

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

IMHO the only word that needs specific censorship is the F word -- that has to be the worst and over-used word in the English language. I can tolerate all other words but that one. Even though he F word can be used in the same sense that deceptikon mentioned above it just sounds wrrooooong.

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

But can you remember what you had for breakfast yesterday, AD?

That might be a bit of a problem :)

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

What! I remember it like it was yesterday :)

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

or the North Koreans trying to get Muslim countries guilty

You give them too much credit -- I doubt that dictator is that smart

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

free() does not change the pointer, it still points to the now-freed strings. Try this

for(index=0;index<50;index++)
    {
        free(report[index].name);
        report[index].name = NULL;
        report[index].score=0;
    }

Also note that NULL refers to pointers, not integers. If you want to initialize an integer to 0 then do that instead of using NULL. Some compilers define NULL like this:#define NULL (char *)0

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

Most likely, but that won't happen anytime soon, if it ever happens.

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

Probably about a 4 hours or so. I'm not on DaniWeb now as much as I used to be -- too busy playing Diablo III.

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

I just found out on CNN that Old Ironpants has died at age of 87. RIP dear dear lady. No matter what your politics are she made a profound difference in he world.

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

I wish I could edit the line of text below my username below my picture at the left side of this post.

Post that request in DaniWeb Community Feedback. Mods and former Mods can do it, maybe those who donate can too I don't know.

deltascrow commented: thanks, I will! +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

That's just so much bullshit. Science is leading noone to destruction. If God created everything then it follows that God also created science, and doctors, and dentists, and ... It's a little like the gun issue -- guns don't kill anyone, people kill people. God created science, so what do you expect He thought we should do with the science He created? I see no conflict between belief in God and science. Science is nothing more then our attempt to explain how and why God created all that stuff. Science is just an attempt to explain to ourselves something that has always existed. Nuclear weapons have always existed, since the beginning of time itself, because God created it that way. Man didn't create nuclear weapons, God did.

So you can not say that "science is leading us now to descrition". That's just a ridiculous statement.

<M/> commented: Brilliant... +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

why are you using stringstre3am? It's like hitting a nail with a slughammer.

What is variable n for? Just use the loop counter i.

if( line[i] == ' ')
{
   break;
}
else
{

}

that will give you only the first word in the line. What are you going to do with the rest of the words that nave not been processed?

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

UNICODE only affects character strings, not bitmaps. For example, you need to convert the string literal "Hello World" by enclosing it in a macro _T("Hello World") (defined in tchar.h). You could also do it by putting capital L in front, such as L"Hello World". Using the _T or _TEXT macro (they are both the same result) is preferable because you can then compile the program with or without UNICODE and not change the code. If you use the L the string will always be UNICODE regardless of how the program is compiled.

Just because you compile a program for UNICODE doesn't automatically change the contents of any files. If your program is attempting to read a file that was written with UNICODE characters then the program will need to read it with wfstream. If the file was not written with UNICODE characters then the program will need to read the file with fstream and convert any strings (not bitmaps) to UNICODE before passing to functions that take UNICODE strings as arguments. There are functions that convert between UNICODE and non-UNICODE strings, or you could write your own function fairly easily if the language is English. In any event, attempting to typecase from char to wchar_t (or vice versa) does not work.

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

Is the drive on the server a shared drive on each of the client computers? I have a home network setup like that, Windows 8 on one computer that shares a folder with other Windows 7 computers. When I'm on Windows 7 computer right click the shared drive I do not see an option to format the drive.

If yours is set up differently then I'd suggest you check the permissions for logged in users -- they should not have full control of the server computer.

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

Yes, but that's not a question.

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

The exe is probably already running. Look at Task Manager and kill it if it is showing as a process.