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

argv[1] is a pointer to a string, if you want the first character in the string then it's argv[1][0]

this makes more sense anyway
argv[1][0] < '0' || argv[1][0] > '9'

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

My grandaughter is already done with spring break, back to school last Monday. As for me, I'm ALWAYS on spring break :)

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

The drivers already exist, you don't have to write them. Read this article and follow the links to examples in codeproject.com

harshi414 commented: Thanx for this ! im working over it ! +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Another way to accomplish it is to not use any external programs to display the data, if you use one of the .NET languages (CLR/C++, VB.NET, and C# you have access to a DataGridView control which is very much like an Excel form. After writing the data to a CSV file you can tell the DataGridView to display it. I've done it in VB.NET but not in the other two languages but it should be similar. I think (not sure) that vb.net can also do some charts to show the data graphically.

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

The simplest way is to generate a CSV file and have Excel import it. The CSV file format is very simple, each field is separated by either a comma or a tab. If the text for a given field can contain commas then use tab to deliminate the fields. Excel can work with either so it doesn't matter which you use. Each line of the CSV file is a row in he Excel spreadsheet.

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

My guess is that the value of Stack.Top is 0. You should use your debugger to inspect its value.

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

Oh, that's fairly easy to do, once you realize that there is a maximum of 256 possible characters, of which only about half are printable characters. So, the first thing you want to do is create an array of 256 integers, initialize them all to 0. Then loop through the sentence (or string) and use the character itself as the index into the array. For example the following partial code, after the loop is finished just loop through the array and use the elements whose contents are greater than 0.

int mian()
{
   int array[256] = {0}; // initialize all elements to 0
   char sentence[] = "Hello World";

   // in a loop
      array[sentence[i]]++;
}
deceptikon commented: "mian". :D +12
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

unless you have one staring you in the face without a fence :)

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

static class methods do not have an instance, they are always present in memory just like a normal global function. When you pass a function as a parameter the function is passed by address very similar to arrys and the address must be known at compile time, not runtime. The address of non-static class methods is only known at runtime when an instance of the class is created.

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

strlen() will tell you hows many characters are in a string. If you are not allowed to use that function then count each character in a loop from the beginning of the string until the null-terminating character 0 is reached.

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

you solve it by declaring the variables somewhere. lines 36 to 39 do not declare variables, whose lines are just function prototypes which do nothing except tell the compiler what the function and its parameter types should be.

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

I have no bad habits because I'm perfect in every way.

<M/> commented: Right... ;) +0
harinath_2007 commented: good joke :) +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I thought I already answered your question. If you are passing an array of structures you don't need the & operator, just the name of the array because arrays are always passed as pointers. If you are passing a single structure then you need the & operator to make a pointer.

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

It's true we all die of something one day, but why hurry it?

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

lines 69, 71, 79, 87 and 88: remove & from the parameters -- they are already arrays. When passing an array all you do is enter the name of the array, adding & operator makes it a pointer to the array (like wait**), which is not what you want.

line 81: scanf() needs a pointer to the variable where it is to store the data. So on this line you need the & to make ep a pointer, since all it is is a char.

line 104: wait->Front makes no sense because want is an array. Which element of wait do you mean? wait->Front is the same as wait[0].Front

line 107: I've already shown you how to fix that and other similar lines.

line 108: Same comment as for line 104 above.

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

Unlike C++, C language requires the data type on line 27, the symbol app by itself is not a data type. It should be struct app applist[2];

wait[] is an array of structures, not an array of pointers to structures. So you need to use the . operator instead of -> operator, something like this:

printf("%s , %d , %s",wait[Front].name,wait[Front].choice,wait[Front].phone)

anestistsoukalis commented: any ideas for the errors ? Thanks for struct and the operaton thing. +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

which version of Borland compiler? You would have to have a 32-bit version in order to access the win32 api functions. Can't do that with Turbo C or Turbo C++. Here are the functions you will need.

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

The difference is that boolean makes more sense to use when all you need is true/false, and boolean probably takes only one byte of memory instead of 4 or bytes for an int. It makes your program a lot easier for us mortal humans to read if you use boolean to represent true/false conditions instead of int.

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

Because you are a Panda Bear
Why do I like to drink water instead of Whisky?

tux4life commented: Lol :) +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

My biggest regret is reading this thread :)

LastMitch commented: Nice One! +0
<M/> commented: oh, how mean ;) +0
ddanbe commented: Indeed, never regret. It's a waste of time! +0
Reverend Jim commented: Yet another thing we share. +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Doesn't Alt-F4 work anymore?

Yes it does, I didn't know about that hotkey.

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

According to this Microsoft article /clr may not be sufficient to make a managed-code DLL. Be sure to read the Remarks section of that aricle carefully.

The /clr option does not imply that classes, interfaces, or structs are managed; use __gc to explicitly specify when you want a construct to be managed

IMHO it would have been a lot easier to have just created a CLR/C++ DLL so that VS can set all flags correctly.

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

very simple to add parameters, assuming you named the structure product

void create_product(struct product*p)
{
printf("\nPlease Enter The Product No. of The Product \n");
scanf("%d",&p->pno);
printf(\n\nPlease Enter The Name of The Product \n");
fgets(p->name, sizeof(p->name), stdin);
printf("\nPlease Enter The Price of The Product \n");
scanf("%f",&p->price);
printf("\nPlease Enter The Discount (%) \n");
scanf("%f",&p->dis);
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

It's not, can be proven that 1+1=3

Why is snow white and not blue like the color of the sky from which it comes?

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

How needs breaks? Any good programmer worth his/her salt can spend 24/7 at the computer.

Reverend Jim commented: Fer sher. +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Programs can run other programs, for example I could write a program that runs PrimePackster's program. So if his program was supposed to hit jack in the head, but missed and returned an error number from main() instead of 0 then my program would know that and take some action. In that instance the operating system passes the return value of main() from PrimePackster's program to my program. The return value from main() can also be used in batch files (MS-Windows) or shello programs (*nix).

PrimePackster commented: OMG! Thats a wonderful addition. Thanks For that..... +3
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

On that line, the Code link could become a menu that indicates the language(s) supported. But I don't know if that's even feasible or possible.

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

Happy Birthday Michael, February is a great month for birthdays. Mine, my son and my daughter were also born during February.

The only memoriable thing I could find on my birthday was

  1. 4 chaplains drown after giving up their life jackets to others (WWII)
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

line 156: you are passing the wsrong type of data. selectionSort() wants an array of integers, not an asrray of structures. If you are tring to sort the class's data array (line 18) then remove the parameter to selectionSort() as it is not necessary. Just have selectionSort() sort data directly. If you want the array sorted by id then just use that field in the sort algorithm then when it's time to swap just swap the entire structure.

line 159: what is array a[]?

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

what is a TnTinMn?

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

Are you able to change the table schema? If yes, then use one or more fields as the unique key. Auto id is nice, but not very usefor for preventing duplicate records.

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

I'm confused why you didn't just remove the extra spaces. :(

Because I didn't know that was the problem until after I posted in this thread. I eventually figured it out but it should not have been that difficult for me to do.

riahc3 commented: Well written: "it should not have been that difficult for me to do" Sums up the editor right there +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

It thinks -1 is the name of a function. You can't code an algorithm like that. Do you mean -1* (exp(double (n))) / n; ?? (multiplication)

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

He at the end doesnt care if its formatted correctly to the standards of Daniweb

Other people do, most won't bother to read unformatted code. If the poster could care less why should we?

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

Are you kidding? The only thing kids know how to do nowdays is play on the computer. I don't think I'd trust some kid to shovel snow off the driveway or rake the leaves, they might get a heart attack from lack of exercise.

AndreRet commented: lmao, indeed ancient. If they hear the word shovel they are already mia!! +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

The limit is probably the maximum size of an executable imposed by the file and operating systems. On 32-bit os it's probably 4gb.

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

I have vb.net 2012, don't know if it's the same as vb 2005 or not. Can you connect using local access? If yes, map a drive from your computer to the computer hosting the database then in vb set up the database just like you did for the local computer. Since MS Access doesn't run as a service you can't just tell vb the ip address and port number like you could with MySQL or MS SQL Server. MS Access is a poor substitute for a real database server.

Begginnerdev commented: Yes...Yes it is.. +8
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Fire the developer you hired and hire someone more competent.

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

It's called "BBC America", I watch it frequently, especially like Dr Who, Merlin and Top Gear.

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

I thought it's 300 years not 200 years.

Since when is 2013 - 1776 = 300 years?

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

Did you ask devcomponent?

nilesh7136 commented: not mean that, but i have solved this dude, there is a problem with windows theme, i have select windows basic theme from windows aero, and its work properly, thanks for reply, +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

American Football is like "Let's play a rough game, but we don't want to get hurt"... pansies.

I'd say American men want to be able to produce babies after a football game :)

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

Because the second halv of that statement is the assignment operator = instead of boolean operator ==.

MRehanQadri commented: Thanks a lot, I was almost gone mad for my mistake. +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I don't repost from Facebook here, but I can't resist reposting this one

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

Everything that you see in XP is also in Windows 8, they are just probably in different places. Once you figure out where everything is at Windows 8 isn't too bad, not too good either. Although I have a touch-screen PC (all in one pc) I still use it like a non-touch screen. One thing I don't like about Windows 8 is how to shut down a running program. Windows 7 and earlier there is an X button in the upper-right corner, that doesn't exist in Windows 8. You have to drag it from the top of the monitor to off the bottom. Very inconvenient.

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

To Americans Yankees is a baseball team.

You are right, the NY Yankees have won more Baseball World Series (we like to call it that anyway) than any other team. I believe the St. Louis Cardnels is in next place.

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

Isn't it interesting that they blame the black out on beyonce?

Yes, it was her fault -- she was REALLY HOT wasn't she :) :)

Quote from Washington Post:

On NBC’s “The Today Show,” Barbara Lippert, editor-at-large at mediapost.com, said she believed the commercial was racist because it was “just saying that black people are happy.”

OMG! Now that's just over the top, can't we even make a commercial depicting people being happy?? Why don't we just ban TV altogether so that won't happen ever again. It's all God's fault, He is just punishing us with happiness for all the gay rights movement. Why otherwise would anyone want to go to Jamaica and have a good time?

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

getchar() only retrieves one keystroke from the keyboard buffer. When you type something you have to also hit the <Return> key, right? The Return key is put into the keyboard buffer along with the other keys you type. After calling getchar() you need to clear the keyboard buffer of all remaining keys. Unfortunately there is no standard way of doing that.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
  1. You need to provide a function prototype for playgame()

  2. Line 43: remove the semicolon at the end of the line.

  3. line 70: you need to provide an else without any conditions to account for cases when the user enters something else.

  4. I think the biggest problem is line 30: an int divided by another int is still an int, not a float. integers have no decimal places, to 1/2 is 0 not 0.5. In order to correct that typecast either the numerator or denominator to float.

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

fgetc() returns int, not char.

The return type is int to accommodate for the special value EOF, which indicates failure:

The while loop should be this so that the rest of the code isn't run when fgetc() returns EOF:
while( (c = fgetc(myfile)) != EOF)