3,892 Posted Topics
Re: [quote=WaltP;337125]For example, have you guys upgraded to Vista? XP is so old... :twisted:[/quote] Sorry couldn't resist this... Is Vista free ? I guess no. Good compilers are not hard to get by, so the only reason for not upgrading would be laziness or some genuine project constraint.... | |
Re: Place the statement [INLINECODE]getchar()[/INLINECODE] at the end of your program just before [INLINECODE]return 0[/INLINECODE] (if you have one) and then compile and run. As for free IDE's look [URL="http://www.daniweb.com/techtalkforums/thread50370.html"]here[/URL]. | |
Re: [quote=iamthwee;337866]Maybe you should stop giving your little sister your problems to solve.[/quote] :mrgreen: | |
Re: If using WinXP goto Control Pane -> Administrative Tools -> Data Sources (ODBC). | |
Re: [quote=pooja_singh;250759]hi!!! this is pooja and i need some help desperately.... i have been told to submit my project in 15 days on airline reservation ..using graphics,filemanipulation,friend function,inheritance and all such features.... prob ic dat file manipulation is yet not taught and inheritance is still too new ..never d less i … | |
Re: Arun, you need to properly format your code. Something like this: [code=c] void read_data() { int i,j,any; char yesno; char fname[15]; FILE *fp; clrscr(); gotoxy(10,10); printf("Data available in disk file Y/N "); scanf("%c", &yesno); if(toupper(yesno)=='Y') { clrscr(); gotoxy(10,10); printf("File name to read data "); scanf("%s",fname); fp=fopen(fname,"r"); clrscr(); fscanf(fp,"%d",&any); for(i=1;i<=n;i++) for(j=1;j=n;j++) … | |
Re: You forgot to close a double quote and main doesn't return void (atleast not in C/C++). Other than that the code really is good to go... ;) I think this should be better moved to the Geek' Lounge. | |
Re: You have just gone out to show one of the horrors of using the GOTO statement in C/C++... :D | |
Re: Don't forget to consider the following situations: • The blank lines may be composed of only spaces. You might need to write a trim function which first trims the lines read and then processes them. • The first line can be a non blank requiring you to initialize the flag … | |
Re: [quote=WaltP;333913]Oh, Salem, you're so funny [/quote] Maybe he wasn't being funny....:twisted: Satish, read [URL="http://en.wikipedia.org/wiki/Compiler"]this[/URL] for a detailed explanation. | |
Re: Oh and btw, just call him Joey, he really likes it. :D | |
Re: Hello my friend, welcome to Daniweb. :D Oh yeah, and keep xlr8ting... ;) | |
Re: Hey there Joey, congratulations on your achievement and the prizes. :D I now believe that the prize thing was for real and not a hoax... ;) | |
Re: Have you tried [URL="http://www.google.co.in/search?hl=en&q=PCI+programming&btnG=Google+Search&meta="]googling[/URL] it ? | |
Re: Replace the round brackets with square ones [] and you are good to go...Oh and btw it would be a good idea to initialize your arrays. | |
Re: Maybe you need to read a bit harder because the links to the compiler are already [URL="http://www.daniweb.com/techtalkforums/thread50370.html"]there[/URL]. | |
Re: Use [search]strcpy[/search] to copy the contents of the string pointed by ch to another string. | |
Re: His name is 'good old Ancient Dragon'... :D | |
| |
Re: [quote=tjay;334096]hi , ok tell me is there anyway to get the source file back? that file was in a USB and deleted from it. [/quote] As far as writing the program is concerned, you can be rest asssured that NO ONE would write the program for you. Any more threads … | |
Re: Possible in WinAPI if you know how to display images and make applications which are windowless(only an image in the center of the screen). Though considering that you are a beginner it would make no sense trying to jump to [URL="http://www.winprog.org"]WinAPI[/URL] before getting the C++ basics right. | |
Re: [quote=joeprogrammer;334083]You must use ==, or you'll end up with a condition that never changes.[/quote] Oh it changes alright, when the expression or L value on the RHS becomes zero. Try it out... | |
| |
Re: Simply said, in pass by value, a copy of the value of the variable is paseed to the function while the original variable remains unchanged. [code=c] void doubleValue (int i) { i = i * 2; printf ("\ni inside function is %d", i); } int main (void) { int i … | |
Re: > In C. It's not a good idea to use that in C++, use cin.get() instead. Any good reason to back that up ? ;) | |
Re: You are better off dumping [URL="http://www.gidnetwork.com/b-57.html"]gets[/URL] which will save you a lot of trouble in the future. Look into functions like [URL="http://www.cppreference.com/stdstring/strstr.html"]strstr[/URL] to ease your task. Oh, and btw, main returns in int. | |
Re: Congratulations Joey (I guess all call you by this name nowadays ;) ) !!! I haven't read your blogs as such but I am sure you must have made it really good. Keep praying that more people start writing blogs so that there really is a second time..... | |
Re: Hello there my friend, welcome to Daniweb. :D And btw, welcome to the party... ;) | |
Re: > My favorite keyboard is [URL="http://www.logitech.com/index.cfm/products/details/US/EN,CRID=2166,CONTENTID=11868"]this little beauty[/URL]. Hope it has a real nice and good "delete" key.... ;) I am really good at adjusting to any kind keyboards and mice as long as they aren't extremely uncomfortable or crappy. What really matters in my case is the kind of … | |
Re: [inlinecode]getchar[/inlinecode] and [inlinecode]getche[/inlinecode] functions just read a character, they serve no purpose in detecting when a key was pressed. You need to look into the [inlinecode]kbhit[/inlinecode] function which detects keypresses and then read the character using [inlinecode]getchar[/inlinecode]. Read [URL="http://www.cprogramming.com/fod/kbhit.html"]this. [/URL]but mind you that the function is highly platform and compiler … | |
Re: Aia and OP, try [URL="http://www.gidnetwork.com/b-58.html"]this[/URL]... ;) | |
Re: [inlinecode]#define PI = 3.14159265[/inlinecode] This statement is wrong. Preprocessor statements are not written this way. The correct way would be: [inlinecode]#define PI 3.142[/inlinecode] or better yet [inlinecode]const double PI = 3.142[/inlinecode] | |
Re: Hey there Kim, welcome to Daniweb :D And as far as grabbing attention is concerned, you can always attach your photo with every post and be rest assured that your photo...err I mean your post will always be read... ;) | |
Re: Why restrict the user by asking him to enter a "period" after the sentence ? Replace your while loop with a for loop, something like this: [code=c] int length = str.length (); for (int i = 0; i < length; ++i) { // do processing }[/code] Accept the whole sentence … | |
Re: Or something like this: [code=cplusplus] if (isspace (*p)) { cout << "The character is a space character"; }[/code] | |
Re: [quote=Aia;332041]Also, if you forget to include the [I][B]break[/B][/I] statement after any case and that evaluates true, the following case will be executed too.[/quote] Oh, that would be all the cases after that, not just the following case. Here is an interesting code snippet: [code=cplusplus] int main () { int ch … | |
Re: A good start would be [URL="http://www.daniweb.com/tutorials/forum21.html"]this...[/URL] | |
Re: [code=cplusplus] MP3::MP3(char * newartiste, char * newsongtitle, int newtracklength) { artiste = newartiste; tracklength = newtracklength; songtitle = newsongtitle; }[/code] The above code is a disaster piece. First thing, all you are doing is assigning the reference or the address of the C string passed in the function to the … | |
Re: Try using the erase method of vectors instead of popping them. Read [URL="http://www.cppreference.com/cppvector/erase.html"]this.[/URL] | |
Re: > how can another class interact with class employee e.g class doctor? One class interacts with another classes by means of object instances. You can always pass on object instance of one class to the member function of another class. In fact we do this all the time without even … | |
Re: Some good links for File processing in C++ are[URL="http://www.functionx.com/cpp/articles/filestreaming.htm"] here[/URL], [URL="http://www.expressnewsindia.com/site/katni/C++%20tutorial%206_1,%20Input-Output%20with%20files.htm"]here[/URL] and [URL="http://www.cplusplus.com/doc/tutorial/files.html"]here.[/URL] | |
Re: Keep a flag variable which will decide whether the operation should be addition or subtraction. [code] { double summand = 1; int n = 1; double sum = 1; bool flag = true; do { summand = summand * x / n; [B] if (flag) sum += summand; else sum … | |
Re: Check if the distance between the center of your square and the random point is less than equal to the radius. If so then the dart has hit the spot otherwise its a miss. This validation should be easy to perform using the distance formula. | |
Re: Some points: 1. Use code tags to post your indented code so that it is more readable. 2. The loop you use for input can easily cause buffer overflows if zero is not entered by the user. If you know the array size in advance, replace all the cumbersome [INLINECODE]while[/INLINECODE] … |
The End.