2,839 Posted Topics

Member Avatar for faisaly

> 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. …

Member Avatar for vijayan121
0
292
Member Avatar for sid_arth2020

[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

Member Avatar for Nick Evan
0
74
Member Avatar for Ajuddy

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 …

Member Avatar for WaltP
0
113
Member Avatar for vze2zv5v

That won't compile, you're missing a bracket and you should [icode]#include <iostream>[/icode] :P

Member Avatar for Narue
0
199
Member Avatar for mysterio

[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 …

Member Avatar for gkbush
1
585
Member Avatar for mrityunjay22

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

Member Avatar for Nick Evan
0
147
Member Avatar for sir avalanche

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 :)

Member Avatar for hollystyles
0
162
Member Avatar for brk235

[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 …

Member Avatar for Nick Evan
0
101
Member Avatar for AshwinCareem

[URL="http://www.cplusplus.com/doc/tutorial/variables.html"]Link[/URL] .Scroll down to Fundamental data types. Niek

Member Avatar for Nick Evan
0
156
Member Avatar for devious

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]

Member Avatar for Michael_Knight
0
163
Member Avatar for Pro2000

[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.

Member Avatar for Nick Evan
0
171
Member Avatar for happy8899
Member Avatar for jefflou
0
134
Member Avatar for Nefrit

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

Member Avatar for Nick Evan
0
72
Member Avatar for toboto

[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

Member Avatar for Nick Evan
0
153
Member Avatar for matthewjay54

Sec / 60 = min min / 60 = hours hour / 24 = days days / 365 = years So what did you try so far? Niek

Member Avatar for np2100
0
95
Member Avatar for nabilchampion

If it only get's that error if the FIRST char = '?' or '*'try checking if 'err' == REG_BADRPT . If so: report back. Niek

Member Avatar for nabilchampion
0
692
Member Avatar for honeyS

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.

Member Avatar for honeyS
0
522
Member Avatar for Red Horse

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 …

Member Avatar for Red Horse
0
99
Member Avatar for abeshare

[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

Member Avatar for Nick Evan
0
122
Member Avatar for The Dude

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

Member Avatar for The Dude
0
255
Member Avatar for sweetcrabhoney

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 …

Member Avatar for Geek-Master
0
60
Member Avatar for maHvic

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 …

Member Avatar for invisal
0
202
Member Avatar for silentdragoon

[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]

Member Avatar for silentdragoon
0
155
Member Avatar for NotThereAnymore

[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.

Member Avatar for bluepeas510
0
220
Member Avatar for upstream

[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

Member Avatar for MidiMagic
0
168
Member Avatar for Jishnu

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? ;)

Member Avatar for Jishnu
0
156
Member Avatar for samari

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 …

Member Avatar for Colin Mac
0
183
Member Avatar for kv79

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

Member Avatar for kv79
0
183
Member Avatar for Nick Evan

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 …

Member Avatar for briansmall
0
137
Member Avatar for ithelp

[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 …

Member Avatar for Narue
0
231
Member Avatar for manster

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]

Member Avatar for Nick Evan
0
947
Member Avatar for revenge2

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.

Member Avatar for Nick Evan
0
86
Member Avatar for mb523

[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 …

Member Avatar for vmanes
0
2K
Member Avatar for makubexiii

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 …

Member Avatar for Nick Evan
0
2K
Member Avatar for rayy

> [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. …

Member Avatar for Nick Evan
0
87
Member Avatar for driplet

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

Member Avatar for Ancient Dragon
0
90
Member Avatar for jsmith9990

[URL="http://www.augustcouncil.com/~tgibson/tutorial/ptr.html"]Here's [/URL]a nice tutorial for you. Come back if you have any questions.

Member Avatar for Narue
0
108
Member Avatar for Ancient Dragon

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 …

Member Avatar for Ancient Dragon
1
101
Member Avatar for Ancient Dragon

[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 …

Member Avatar for jbennet
0
242
Member Avatar for ashok1424

[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 …

Member Avatar for Nick Evan
0
104
Member Avatar for wijitha

The best way is to keep track of how many integers you've stored with a counter-variable.

Member Avatar for Nick Evan
0
254
Member Avatar for ybn1197

change: [code] $i = 0; while ($i < '3')[/code] to: [code] $i = 0; while ($i < 3) [/code] That may help a little regards Niek

Member Avatar for Nick Evan
0
851
Member Avatar for maHvic

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 …

Member Avatar for Nick Evan
0
101
Member Avatar for maHvic

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 …

Member Avatar for Nick Evan
0
242
Member Avatar for chaosatom333

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

Member Avatar for Nick Evan
0
117
Member Avatar for Aprilia

[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 …

Member Avatar for MattEvans
0
190
Member Avatar for cs378

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]

Member Avatar for Ancient Dragon
0
123
Member Avatar for EmpireZ

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

Member Avatar for EmpireZ
0
64
Member Avatar for johnnyjohn20

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?

Member Avatar for Salem
0
142
Member Avatar for GrimJack

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

Member Avatar for GrimJack
0
273

The End.