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

what does that have to do with artifical intelligence? And what about the code? you need to explain what you want a lot more than that.

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

You can always ask questions about the problem here at DaniWeb. DaniWeb is not just for doing school homework.

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

min and max do not work with floats -- use only integers with those macros. For floats you have to use fmin() and fmax()

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

When you say "it doesn't run to completion", where exactly does the program stop working? Which version of Dev-C++ are you using?

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

You first have to have a C++ compiler. There are several free ones, including (but not limited to) Code::Blocks, and Visual Studio Express. Just google for them and you will find the download links. If you want Code::Blocks get the version with MinGW compiler. That is a popular compiler/IDE for beginners because it is easy to learn and portable between MS-Windows and *nix operating systems. If you are using *nix then Visual Studio is not available to you.

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

However, the more veteran members (many of which no longer participate) were able to rack up quite a bit of reputation points over the years in these categories.

DaniWeb has not allowed rep in Community Center for several years now. I don't know how many I got from there but you would probably be surprised to see how few of mine are from my posts in Community Center. Most (roughly 80%) of my 32,000 posts are in the C and C++ forums over the past 7 years. So even if Dani removed all those rep points as you suggest it probably would not make much difference in member's rankings.

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

That site is now permanently down.

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

When I click the Endorse button everyone shows up in just some random order which makes it kind of difficult to find a specific person. Can (or will) you sort the list alphabetically to make it easier to find someone?

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

When server gets a request from client the server should create another thread and process it there. The exact way to do that will depend on the compiler and operating system you are using. There is no standard way to create threads in C language. Now if you used c++ you could use os-independent functions to create threads.

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

I do not understand why did you make 3 for loops?

And I do not understand why you responded to a 6-year-old thread

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

LMAO! At first I thought that (German Invasion) was a serious article, but soon found out it was just satire. Brilliant.

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

Suggestions

Yes -- post the code so we don't have guess

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

You should have started your own thread instead of hijacking this one. But I assume by "any_name" you want to make the table name variable? If that is correct then just use sprintf() or string concatination to construct the whole string in a character array or std::string and pass that to mysql_query

std::string sql;
std::string table_name = "mytable";

sql = "INSERT INTO " + table_name + 
  " (message, author, eml, date, ip) VALUES ('heya','me','sy@so.com','07:07 AM 27th May','141.85.0.113')"

if (mysql_query(conn, sql.c_str())
{


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

That's not so surprising since, according to wiki (which is a final authority of all subjects :) ) England was populated about 30,000 years ago and has been conquered by a lot of different people/nations.

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

Yes, works for me now too. Don't know why it didn't work before.

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

Nonetheless-- people who live in NYC are just weird :)

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

Click the date link should take me directly to the last post of the thread, but it doesn't do that any more.

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

The way I understand it -- and I'm no expert on the subject -- is that Cloud Computing is nothing more than storing data on someone else's server so that you can access it by any computer that has the correct permissions. It's similar concept to having an external hard drive -- but this time the external hard drive is located somewhere on the internet. AFAIK you can't run other programs on it, such as MySQL server, the cloud is for storage and retrieval only. It would be great if a database server could be running on the cloud so that everyone within a world-wide company could access the same data at the same time, just like they can now with a LAN database. And that would be a great advancement in the medical field where a doctor could access a patient's data from anywhere in the world.

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

That could actually be very difficult, depending on what font you use in Notepad.exe. Some fonts are variable width so that the letter M is a lot wider then the letter I. If you use a fixed-width font then your problem becomes a lot easier, just count the number of characters up to the column you want.

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

Did you try it? If not, why not?

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

People from NYC are kind of weird -- the rest of US calls it Public Transport

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

return statements do not have a format such as "%f" -- just simply supply the name of the variable to be return. Example: return netAmount;

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

Run the program and find out if it works correctly or not.

line 11 has a semicolon at the end -- remove the semicolon

The if statement on line 12 is not needed so you should delete it. The while should look like this:

while( <condition here> )
{
   // code here
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

The program would be better if you used a do loop instead of while loop. And you don't need to use the mod % operator in this program like you did in your other program.

start of loop
   display prompt to enter a number
   call scanf() to get the number in variable named N.
if number is <= 0 then go back to start of loop

print the sum of all numbers from 1 to N.  You need another loop for this
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Granted, but since everyone else got an A++ your grades are on the very bottom.

I wish I had a new Lamborghini car.

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

You don't need a loop in IsEven(). That function should have only one parameter, the integer that is to be tested (see the function prototype at line 1 of your program). Do remove the second parameter, and delete lines 14, 15, 16 and 22.

Your program also needs to include stdio.h using the #include statement.

After you have done the above, put lines 6 and 7 in a loop that terminated when you enter 0 for the integer.

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

you need an infinite loop that does four four things

  1. display a prompt, such as "Enter an integer"
  2. Get user input using scanf() function
  3. Call IsEven() to determine if the integer is odd or even
  4. If odd print the number on the screen

Please post all the code you have written so far so that we can see what you have done.

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

Do the assignment one small step at a time and you will soon be finished. First write the program to ask for the integers. Do you know how to use printf() and scanf()? Once you get that compiled and tested continue with the function IsEven(). Use the % mod operator to find out if the integer is odd or even. Any Number % 2 will tell you that. With that you should be able to finish the assignment.

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

you need to post BST_pointer-Recursive.c and BST_pointer-Recursive.h

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

peanut butter sandwiche.

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

You need to read a file i/o tutorial like this one

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

I started wearing glasses when I was in 9th grade -- nearsighted. I started computer programming in my 40s and got a lot of eye strain from staring at those green monitors -- it was really painful. Monitors are a lot better today with almost no eye strain at all.

You're only as old as you feel, and I feel as if I am in my 40s most of the time. Yes, I still like to play video games.

cproger commented: haha +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

The functions are commented out. For example, look at line 17 in words.c

#if ylop == 'B'

Where is ylop defined?

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

Did that but didn't help. I'm using Chrome on Windows 8 if that makes any difference.

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

Your example is incomplete/incorrec -- where is the variable i changed? Answer: it isn't, so the output you posted is wrong. The correct output is "111111111..."

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

please zip up your project source files and attach them to your post along with the makefile you use. We don't want the compiler-generated files such as *.o so delete them before zipping.

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

delete lines 9 and 10, then replace them with a line tht declares a FILE* variable, opens the file for reading, then calls fgets() to read the first line of the file into the string variable.

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

plzzz aj he reply ker dain..mjhay kal apni teacher ko inform kerna ha about my project...

Huh?? That makes no sense in Engligh.

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

That's the right order, but I just tried it again on your post in the same thread -- same result for me. Maybe because you are Admin and have different privileges???

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

you also need to replace iostream with stdio.h, add .h extension to the other includes, delete like 4, and replace cout with printf()

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

Check out Mike's post in this thread. His rep did not change. Nor does it keep the comment I added.

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

I recently intended to upvote with a comment but accudently upvoted without comment. I then pressed the uparrow again to erase my previous upvote so that I could do it again. I added the comment, pressed uparrow and the comment was accepted, however after I refreshed the page I noticed that the member's rep was not changed.

Once an upvote without comment is made is it not possible to add comment so that the member's rep is increased?

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

The while statement is a loop that contininues to execute until some condition is met. For example consider vriable named x in this simple example

int x = 0;
while (x < 10)
{
    x++;
}

In the above the loop will continue until the value of x reaches the value of 10. Notice that the value of x is incremented inside the loop. If x was not incremented inside the loop, the loop would be considered an infinite loop because the value of x would never change. So there must be something inside the loop that will eventually make it stop.

Another way to make the loop stop is to use the break statement

int x = 0;
while( x < 10)
{
   if( x > 2)
      break;
   x++;
 }

I know that is kind of a stupid program but it illustrates how to stop the loop early.

That really all there is to a while loop -- nothing more difficult then that.

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

what exactly is the error? compiler error? runtime erro? you get the "6rror opening file" message in your program?

You also need to tell us what compiler and operating system you are using.

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

Looks great -- maybe I can now get rid of all my remote controls.

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

line 76: I don't see where pointer p was ever initialized. That means function add() is getting an invalid pointer parameter.

Maybe you need to rethink how add() is supposed to work. IMHO add() should increase the array size by 1 each time it is called, and the first parameter should be a pointer to a pointer, so line 139 should be

int main()
{
    struct person* p = NULL;
    int max = 0;
    // now add a member to the array
    add(struct person &p, &max);
}


void add(struct person **p, int* max)
{
    *p = realloc(p,(*max+1) * sizeof(struct person));
    (*max)++; 
}

I think your delete function is also coded wrong, you don't need two loops. Check for both first and last names in the same loop.

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

I didn't say your reply was wrong, just outdated. Do you know of any other os except MS-DOS 6.X (or some embedded systems) and earlier versions where pointers are not all the same size? I understand the standards don't say they have to be, but in practice I think they are all the same size.

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

AFAIK there is no such thing as "far" and "near" pointers on platforms other than ancient 16-bit MS-DOS (and maybe some obscure embedded systems)-- the flat memory model doesn't have segmenets, unless you might say everything is in near segment.

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

Didn't work afterall. The registry entry is still set to what I want but when I start IE the home page is set to something else.

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

Most of that is due to one guy I know :)

Reverend Jim commented: I love it. +0