2,839 Posted Topics
Re: [QUOTE=thinker;478589]u hav got it all wrong .... the first one doesnt work too.... [/QUOTE] Yes it does. Did you even try it? This piece from the code (#1) is very important: [CODE]else[B][COLOR="red"];[/COLOR][/B][/CODE] The semicolon means that there is no else statement, and thus the code in brackets is always executed. … | |
Re: Google is your friend: [URL="http://www.google.nl/search?hl=nl&q=threads+c%2B%2B+examples&meta="]click[/URL] | |
Re: They appear, but the pop-up is about 300 pixels to low on the screen. See attachment Niek | |
Re: If you're not an experienced programmer, this problem will be near impossible to complete in only one week. With that said: Is the background static or is the camera moving and therefore the background moving? If the background is static you should loop through the 125 images and compare each … | |
Re: [QUOTE=mikeandike22;478251] error C2057: expected constant expression error C2466: cannot allocate an array of constant size 0 [code] cin >> inSize; double Nums[inSize]; [/code] [/QUOTE] You can't declare an array with a variable size. Use a const int instead, or use [ICODE]new [/ICODE]and [ICODE]delete[/ICODE]. This should have never compiled in gcc.. … | |
Re: [QUOTE=c.kiranmayee;478362]c prg to simukate a car wheel and steeering[/QUOTE] Something like this: [CODE=c]int main() { printf("simukate car wheel and steeering"); return 0; }[/CODE] But now serious: What are you trying to say and what have you made so far? The people on this forum will not just hand you your … | |
Re: [quote=title of thread] Do my homework for me [/quote] Narue was here? :) Post your code and you will recieve help Niek | |
Re: Add: [CODE=cplusplus]cin.ignore(); cin.get(); return 0;[/CODE] to your code just before the last closing bracket to keep the terminal-window open until you press a key. change: [ICODE]void main()[/ICODE] to [ICODE]int main()[/ICODE] Your (turbo?) C++ compiler might not complain about it, but most of the compilers will. void main() doesn't exist. change … | |
Re: [URL="http://www.daniweb.com/forums/thread63827.html"]Here's [/URL]a usefull thread by ~s.o.s~. | |
Re: [QUOTE=WaltP;474878]If you look up the format of the [icode]if[/icode] statement, you will find the statement should be [code] if (license_plate[5] == '9') { } [/code][/QUOTE] And you have the same problem as WaltP said with your while() statement: [icode]while (answer = 'Y')[/icode] should be: [icode]while (answer == 'Y')[/icode] The difference … | |
Re: [QUOTE=fox_racing;474671] I have looked over loads of site and they all seem to give me this .... "mail("$to", "$subject", "$email", "$message");" Does this code simply bring up the users email program (i.e. Outlook) and load the mail into that? [/QUOTE] No. It will send an e-mail directly. Try this simple … | |
Re: [QUOTE=alcoheca;475008]What site are you talking about? is the recursive function the [B]if[/B] inside the [B]do...while[/B]?[/QUOTE] Never mind him, most of his posts don't make sense.. [edit]too slow... [/edit] | |
Re: [QUOTE][CODE=c]atoi(dob.c_str())[/CODE][/QUOTE] That's one way to do it. I would do it like this: [CODE=c]istringstream convert(dob); int intDob =0; convert >> intDob[/CODE] And voila: string dob is now saved as an int in intDob! | |
Re: Can you give a piece of example code? I don't understand what the problem is. What special chars in Dutch/Belgium language are you talking about. I'm from the Netherlands and I don't know any 'special' characters :-O | |
Re: [QUOTE=sugarflaps;473443][code] int i = char ( PIXEL_1 ), j = char ( PIXEL_2 ); [/CODE][/QUOTE] This is a very weird line of code. If you're trying to create an array of chars dynamicly you should look at [URL="http://en.wikipedia.org/wiki/New_(c++)"]new and delete[/URL] Then in the next line you say: [icode]for (i = … | |
Re: [QUOTE=kano;473329]C++ was invented by bjarne stroustrup at at&t bell laboratories.[/QUOTE] Wow... now there's a piece of info I would have never found without your [URL="http://en.wikipedia.org/wiki/C%2B%2B"]help[/URL].. great post. (sarcasm) | |
Re: How old is it? I suspect the PSU (onboard) has died on you, the only solution is to replace the entire thing which is quite expensive. So your best shot would be warranty.. | |
Re: [QUOTE=vocater;469502] This is what I have come up with so far ..[blabla][/QUOTE] This is what YOU came up with?? Don't make me laugh, it is the EXACT same code as the OP posted in this thread (30 days ago). If you're going to try to fool us, you really should … | |
Re: I strongly suggest that you try Narue's option. What didn't work with that code? >If u can provide me with wat u have done, that will be help ful. Where to start.. - don't use [void main](http://www.research.att.com/~bs/bs_faq2.html#void-main). Use `int main(void)`, that's how it's defined. (or `int main(int argc, char* argv[])` … | |
Re: First: please use [URL="http://www.daniweb.com/forums/thread93280.html"]code [/URL]tags. It makes you code readable. [QUOTE=badbloodyeyez;469586]the following is my code and I am getting an error for this code I compiled it with cygwin and the error is "error while dumping state" [/QUOTE] The program compiles fine for me, or do you mean a runtime … | |
Re: [quote=Pačo;465136][code] { FILE * pFile; pFile = fopen ("myfile.txt","w"); if (pFile!=NULL) { fputs ("fopen example",pFile); fclose (pFile); } return 0; } [/code] Problem is...there is no fprintf() :S? And I don't know where to insert it :S[/quote] Look for what fprintf is suppose to do. If you do, you will … | |
Re: [quote=imran_s;466458]I did the same thing that you did on more than 1 computer and i get the same problem. Lets say u wanna convert 255 from base 10 to base 10. Youre supposed to get 255 as the answer, howeever i am getting 254. when i try to convert any … | |
Re: [quote=lydia21;466670]hi, how to validate email id in php...please send some code....lydia[/quote] something like this perhaps: [code=php] $email = "a@b.c"; if (stristr($email, "@") == false || stristr($email, ".") == false) { die("No valid email"); } else { echo("email = valid"); } [/code] Didn't try it, but it might just work :) … | |
Re: Do you have any programming experience? If not: vb.net is not that hard (..) to learn, but my personal favourite is C++ Niek | |
Re: [quote=nurulshidanoni;465087] error C2447: missing function header (old-style formal list?) Error executing cl.exe. [/quote] Well where is your min() function ? I see the defenition but where's the rest? Did you ever use functions before? Niek | |
Re: We even call it 'alcohol' in Holland, so it's kind of an international thing isn't it :) [QUOTE=Ancient Dragon] Its a soda that tasts like cow urin [/QUOTE] Aha! It's called 'golden power' here in Holland. I prefer Coffee (and lots of it) to keep me awake! | |
Re: Please read [URL="http://www.daniweb.com/forums/thread78223.html"]this[/URL] . I have no clue what so ever what you are trying to say. What code did you write? [quote=Alethea;466134] write a program that the user is converting from and to base, and also from value. [/quote] Here's a wild shot : [code=c] int main(void) { int … | |
Re: [quote=zandiago;466136]your format is a type of function?[/quote] No. It's the answer in math. If we set x=1 the answer would be 3*(3*(3*(3+1)+1)+1)+1 = 121 That would be the smallest amount of bars it would be possible with. If you fill in the x with any other number it would result … | |
Re: The connection should be described in the manual you got with the mobo. If you don't have the manual you could try contacting Asrock for info. Without the pinout, I can't really help. Regards Niek | |
Re: I don't know the function, but it looks to me like it is calling de uC to writedata (led 2 on = 12, led 2 off = 02). Perhaps the datasheet could clear this up? Niek | |
Re: To the best of my knowledge, this isn't possible. It would be very convenient for virus-programmers to kill your computer wouldn't it? What exactly would the use of this program be? | |
Re: Check out the [URL="http://msdn2.microsoft.com/en-us/library/system.net.httplistener.aspx"]httpListenerClass[/URL] For the record: There is no such thing as VC++, you're coding C++ in Visual Studio. | |
Re: [quote=Ancient Dragon;463782]...Or you could use pipes (see man pages for [B]popen()[/B] )[/quote] Or even named pipes which can be accessed just like any file Niek | |
Re: The semicolon tells the 'if statement' to do nothing when it is placed directly after it. In other words: if the statement is true do: ';' (nothing) When the program passes that point it comes to: [code] { std::cout << number_1 << " == " << number_2 << std::endl; } … | |
Re: I'm not a big fan of 'goto'... You could try something like: [code=cplusplus] int main(void) { char Choice = 'Y'; while (Choice == 'y' || Choice == 'Y') { // do your stuff cout << "More?" << endl; Choice = cin.get(); } } [/code] It will continue your program until … | |
Re: You could try something like this: (pseudocode) int input, average, total, count; [CODE] while(count++) { ask for input ; if (input == 0) break; // 0 quits te program total += input; average = total / count; } printf ("Total = %d, Average =%d", total, average; [/CODE] You'll have to … | |
Re: It shouldn't that much of a challenge when you're allready able to write recursion :) - ask a user for input before you call your function - add a 3th var to the function which is the number of times the user just entered - in the function count down … | |
Re: hmm, are you calling that ' open' function the right way? source: [URL]http://msdn2.microsoft.com/en-us/library/7ca7bkdw(VS.80).aspx[/URL] try calling it like: [CODE] CDatabase srfDB ; srfDB.Open( _T( ".SQLEXPRESS" ), FALSE, FALSE, _T( "UID=sa; PWD=sa123; DATABASE=srfdb.mdf" )); [/CODE] [COLOR=#0000ff][/COLOR] | |
Re: I don't think it would add much to the site. By the way: you're the first person I see that posts 84 messages in his first 3 days on daniweb :eek: Regards Niek ![]() | |
Re: Don't know if it's available around the world, but did anyone try Stroh-Rum? Tried 0,25 l once and got drunk very quickly ( it's 80%....). Cheap night though... | |
Re: Here's a one: A person was given the deathpenalty, but the judge said that he could say a few last words. If he lied he would be hung but if he told the truth he would be decapitated. The person says something and he is released because the judge couldn't … | |
Re: That's what you get when you copy-paste code... De lines got messed up, and now the linenumbers are in your code: In line 4: Remove '5' In line 9: Remove '10' In line 12: Remove '13' | |
| |
Re: > Is MFC gone? No it's not. Microsoft deceided to release a free version of VS2005 called 'express'. But as we all know, microsoft doesn't really like giving things away for free, so they cut VS2005 down to size and called it 'express'. One of the features that was removed … | |
Re: Can't take a few weeks off without everything changing over here... Here's my penny: [nag mode] I don't like the new rep-system. Infarction, ~s.o.s.~ and Joe are right, it has lost all meaning. In the past you had too make a really helpfull post (in descent English) to recieve Rep. … | |
Re: [quote=MidiMagic;358004]A script is running on the page which stops me from scrolling. I think it is with the Global Spec ad, since it does it only when that ad is present.[/quote] I used to have this problem. My statusbar would say done, but I couldn't scroll. The problem disappeared a … | |
Re: [quote=Gel;358923] if you want the code to be in between 0 and 4.0,its should be while(grade>0&&grade<4.0) [/quote] No. If she replaces her line (in Joe's code) with yours it would continue to say "[COLOR=#0000ff]"Enter a grade on a scale of 0.0 to 4.0: " [/COLOR][COLOR=black]while the input would be correct..[/COLOR] … | |
Re: [quote=Thinka;362013]"pos = mid"...[/quote] You mean pos == mid. I can't see why this code would work. You are using variables mid and pos in your main. But: they never get a value in main. Now I here you thinking: "But I'm using them in [inlinecode]binarySearch()[/inlinecode]." Well no, the variables mid … | |
Re: I do care a little. I was quite fond of the purple-yellow combo. But apparently it was time to move on. The new colors aren't that awefull. :icon_mrgreen: I personally don't think any new person to the site will notice that the color changes in the different fora. 99% of … | |
Re: So you've bumped a two year old thread to say: tolong convert pascal ke C++..... What does that even mean? |
The End.