2,839 Posted Topics
Re: > Can over running of array lead to the catastrophic failures? Yes. >who is responsible to prevent array overruns? The programmer is. It's one of the things the programmer should anticipate and prevent. There are some functions that can help you with this, like strlen for an array of chars. … | |
Re: [QUOTE=plgriffith;525605]At least attempt your homework before you ask for help.[/QUOTE] [quote=sid_arth2020] I tried but couldnt find the solution [/quote] Haha, I think plgriffith meant: CREATE a solution, not google one. Now on topic: how would you know which card was missing? Niek | |
Re: A few things are wrong: - It's int main() not void main() - If you want to use atoi, you'll have to include <stdlib.h> - Don't use gets(), you don't need to take in a string when you want an int You have an error is this line: [code=c]printf("\nList of … | |
Re: That won't compile, you're missing a bracket and you should [icode]#include <iostream>[/icode] :P | |
Re: [QUOTE=canadianvpk;521533]sent a palindrome program in vb [/QUOTE] So you bump a 2.5 year old thread and then expect to get some free homework? You're not even in the right forum, this is C++ not VB. [QUOTE=canadianvpk;521533]quick [/QUOTE] [...] Here's what you could try: - Begin programming it yourself - If … | |
Re: Is php_mysql.dll included in your PATH? If not, you should find the file and include the full path of the file in php.ini Niek | |
Re: I COULD help you, because the errors are all related to the same problem, but without asking "why do you want to do this?" I can't be sure that you're not trying to make somesort of 'virus'. So I won't help, sorry :) | |
Re: [QUOTE=brk235;521313][code=c] MessageBox(NULL, "Goodbye, cruel world!", "Note", MB_OK); [/code] İam getting following error.. error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [22]' to 'LPCWSTR'Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast[/QUOTE] There is more then one way to solve this, the easiest is … | |
Re: [URL="http://www.cplusplus.com/doc/tutorial/variables.html"]Link[/URL] .Scroll down to Fundamental data types. Niek | |
Re: Did some 'research' for you :) : [quote=wikipedia] Blogroll A list of blogs. A blogger features a list of their favorite blogs in the sidebar of their blog [/quote] | |
Re: [QUOTE=technogeek_42;515117]can i beg with dat software?[/QUOTE] You probably could, but I would prefer a cup or a hat, it keeps the coins in. | |
Re: Here's a [URL="http://www.daniweb.com/forums/thread63827.html"]link[/URL] | |
Re: This is the software DEVELOPMENT forum, you would probably have more chance in the [URL="http://www.daniweb.com/forums/forum92.html"]windows software forum[/URL] Next time you post, don't use annoying colors/bold/italic. It makes your post hard to read, which will result in fewer reactions. Niek | |
Re: [QUOTE]i have problem with #include <graphics.h>[/QUOTE] This code can only be compiled by the (ancient) Turbo C compiler, so if you try to compile it with something else this error will come up. I'm guessing you're using something newer? Niek | |
Re: Sec / 60 = min min / 60 = hours hour / 24 = days days / 365 = years So what did you try so far? Niek | |
Re: If it only get's that error if the FIRST char = '?' or '*'try checking if 'err' == REG_BADRPT . If so: report back. Niek | |
Re: I'm not familiar with the type 'Tskindata', but I suppose you forgot to include some headers, or forgot to add the required libraries to your project. | |
Re: Your problem is in this line: [ICODE]if ([B] r = 0[/B] || r == rows-1 || c == 0 || c == cols-1 )[/ICODE] Do you see the error in the bold part? You're telling the compiler that r becomes 0. You're not asking if r equals 0. So r … | |
Re: [QUOTE=abeshare;511273]hello anyone[/QUOTE] Hi [QUOTE=abeshare;511273]I want to dislpay my cout in an acsending order by ssn ... -lot's of code-[/quote] Cool. Do you have a question? Before you post again please read [URL="http://www.daniweb.com/forums/thread93280.html"]this [/URL]about code tags and [URL="http://www.daniweb.com/forums/thread78223.html"]this [/URL]about asking clear questions, meaningfull titles and bumping. Niek | |
Re: I didn't have the problem until today (I have used IE6 since it came out ). I have no clue why it happens, but if you click on the Add-Reputation link everything suddenly loads up fine :-O Niek | |
Re: Html is not a real programming language, so the experience you have with isn't worth very much when you start programming. Are you trying to make an online game? If so you should use flash or Java. But be adviced that when you start programming, it will take a long … ![]() | |
Re: read my replies to: [URL="http://www.daniweb.com/forums/thread100481.html"]http://www.daniweb.com/forums/thread100481.html[/URL] and [URL="http://www.daniweb.com/forums/thread100459.html"]http://www.daniweb.com/forums/thread100459.html[/URL] (your other two threads) Why have you included conio.h? It's outdated and you're not using any of it's functions? [icode]system("pause")[/icode] -> this is asking for trouble. What happens if you run this program on linux? : bash: pause not found Use cin.get() instead … | |
Re: [QUOTE=Salem;506497] You can say this more succinctly with while ( fgets( str, sizeof str, fp ) != NULL ) [/QUOTE] Minor correction on that one: [icode]while ( fgets( str, sizeof(str), fp ) != NULL )[/icode] | |
Re: [quote=DaMoogle;299808] So, how can I install the updates without messing up Volume Control?[/quote] Try reinstalling the soundcarddrivers after you've done the windowsupdates. | |
Re: [QUOTE=upstream;467373]hi! does anyone knows how to convert metric units to pixels?[/QUOTE] It depends on how many dots per inch you use (DPI) If you know this, you know how many pixels per inch and then just use midimagics tip Niek | |
Re: Visual Studio Express is free and will do the job. [URL="http://www.microsoft.com/express/download/default.aspx"]Here's [/URL]a link. So you're giving up on the Turbo C++ compiler at last? ;) | |
Re: How is this a scoreboard? Correct me if I'm wrong, but it looks to me that this program just makes a number of outputs 'high' with a delay of 10 (sec/msec??) Where is the delay function because it isn't standard so you probably wrote it (or 'found' it). How do … | |
Re: You can use any number for your own ID's [CODE]#define MY_ID 40001[/CODE] This means that MY_ID = 40001, not that 40001 = MY_ID. [QUOTE]I try a MSND but it took me too much time so i ...?[/QUOTE] So you ...? Niek | |
I'm following Narue's advice by posting this here. It is not my intend to start anykind of flamewar, I think we can discuss this like 'normal' people. So here goes: From this [URL="http://www.daniweb.com/forums/thread101318.html"]thread[/URL] [QUOTE]calling someone sub-human or comparing him with massmurderers from the previous century (and calling them heroes...) are … | |
Re: [QUOTE=cscgal;492292]Self-promotion is permitted in signatures because I feel that it is our way of thanking you for contributing to the community by havng one or two lines where you can link to your resume, your freelance company, etc.[/QUOTE] But are all the sites in ItHelps signature from himself? I remember … | |
Re: You've mismatched some brackets in line 104: [CODE]if [B][COLOR="red"]( [/COLOR][/B](contacts[i].firstname == name) || [B][COLOR="red"]([/COLOR][/B]contacts[i].lastname == name))[/CODE] I've added two open-brackets. [edit] [QUOTE=ithelp;492815]Replace contacts[i] with pim.contact[i][/QUOTE] I think you mean: [icode] pim.contact[B]s[/B][i][/icode] | |
Re: I'm not using Bloodshed, but it probably as a function like 'clean build' or 'Rebuild all'. You could try that when you open a new project. | |
Re: [QUOTE][CODE] while ((ch = cin.get() != '\n') && (index < MAX-1)) { array[index] = ch; index ++; } array[index] = '\0';[/CODE][/QUOTE] Your while-loop runs from 0 to MAX-1 (19). This is good because the array can contain 20 elements (0-19). But then you do this: [ICODE]array[index] = '\0';[/ICODE]. But index … | |
Re: What WaltP is trying to say is that: [icode]if (x<10&&x>20)[/icode] is wrong: This statement means: if x is less then 10 AND bigger then 20. What number do you know that is smaller then 10 and bigger then 20? Just replace it with :[ICODE] if (x<10)[/ICODE] And another thing: what … | |
Re: > [icode]#include <iostream.h>[/icode] I disagree: Use [icode]#include <iostream>[/icode] instead > [icode]char names[5][10];[/icode] What happens when a name is longer then 10 chars? Use a string instead > [icode]cout<<"enter names of candidates"<<endl;[/icode] This will result in "undefined identifier 'cout'" error. Use std::cout and std::endl or add 'using namespace std' before main. … | |
Re: You don't need a function for that. Example: [CODE]char ch = 'a'; int i = ch; cout << "Char " << ch << " = ASCII: " << i << endl;[/CODE] Regards Niek | |
Re: [URL="http://www.augustcouncil.com/~tgibson/tutorial/ptr.html"]Here's [/URL]a nice tutorial for you. Come back if you have any questions. | |
Re: I'm experiencing some other problems. When I try to load a page, it gives me *a lot* of rubbish PHP-code (starting with [icode]©®', 'closetag' =>[/icode] ends with [icode]### end pluginlist ### ?> [/icode] then [URL="http://www.daniweb.com/forums/dani-images/misc/dani/signature.gif"]this [/URL]picture and then the rest of the page as it should look like. Started about … | |
Re: [QUOTE=cscgal;486468]A behind the scenes change has been made where posts made in staff-only forums no longer count towards the post count of us moderators.[/QUOTE] That's funny, because I'm not a moderator and my postcount has still dropped somewhere in the last week. I went over 500 posts the week before … | |
Re: [QUOTE=ashok1424;488119]hello i would like someone to help me to create a code in C for prompting a user to name a text file[/quote] use something like: [ICODE]fscanf(stdin,"%s", &test);[/ICODE] where test is an array of characters [QUOTE=ashok1424;488119] and then open it [/QUOTE] Look at [URL="http://www.cplusplus.com/reference/clibrary/cstdio/fopen.html"]fopen [/URL] for opening files. If you … | |
Re: The best way is to keep track of how many integers you've stored with a counter-variable. | |
Re: change: [code] $i = 0; while ($i < '3')[/code] to: [code] $i = 0; while ($i < 3) [/code] That may help a little regards Niek | |
Re: It is always easier to learn a programminglanguage when you already know some other language. Most languages use the same basic 'functions' i.e. loops, if statements, variables, functions (classes etc). The difference is in the syntax (the way it is written). I can't give you an example, because java is … | |
Re: Assuming that you want a 8-bit binarynumber and your input contains only printable-chars: First: convert the string (assuming it is a string) to a c string (with [icode]string.c_str()[/icode]) Now you'll have an array of chars which can be converted very easily to ints. Now convert this number to binary (by … | |
Re: I would also check if opening the file(s) was a succes or not. This will spare you the memory exceptions in the future. Niek | |
Re: [quote=Aprilia;465253]Basically i'm wanting to know is it possible to open ax existing exe? to create further add-ons to its existing file? [/quote] Well, it's not imposssible, but that's it. You'll have to look or a decompiler and if your lucky you'll get some usefull assembly-code. But to understand this code … | |
Re: So where is the rest of your program? I guess this is a homework assignment? Because you could just use: [code] int main() { system("man ls > newfile.txt"); return 0; }[/code] | |
Re: You could look at the strtok() function. This function takes a string and a character as arguments, splitting the string when it encounters the char. Niek [edit] Here's a [URL="http://www.w3schools.com/php/func_string_strtok.asp"]link [/URL]with the exact program you want | |
Re: How about: [CODE=c]if (a[i] > 0.000592654 && a[i] < 0.000592655) a[i] =0; [/CODE] This would set any value between the two numbers to 0 (BETWEEN, so 0.000592655 and 0.000592655 are not included) Is this what you want or did I misunderstand your question? | |
Re: I hope you're not carrying a chainsaw through the house in real life, miss motherator ;) [QUOTE=Ene Uran;473846]Lardmeister: don't use a duck, that's a pretty stupid bird, you are smarter than that, use something like goofy.[/quote] Jwenting might give you a ban for this.... :) Niek |
The End.