2,839 Posted Topics

Member Avatar for boyz

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

Member Avatar for WaltP
0
119
Member Avatar for mjmythili

Google is your friend: [URL="http://www.google.nl/search?hl=nl&q=threads+c%2B%2B+examples&meta="]click[/URL]

Member Avatar for Nick Evan
0
79
Member Avatar for Ancient Dragon

They appear, but the pop-up is about 300 pixels to low on the screen. See attachment Niek

Member Avatar for MidiMagic
0
263
Member Avatar for iamconfused

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 …

Member Avatar for iamconfused
0
218
Member Avatar for mikeandike22

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

Member Avatar for Nick Evan
0
282
Member Avatar for c.kiranmayee
Re: Cprg

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

Member Avatar for ithelp
0
85
Member Avatar for Amnah AL-Abdi

[quote=title of thread] Do my homework for me [/quote] Narue was here? :) Post your code and you will recieve help Niek

Member Avatar for ithelp
0
84
Member Avatar for kidjl

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 …

Member Avatar for jbennet
0
145
Member Avatar for NoobertGames

[URL="http://www.daniweb.com/forums/thread63827.html"]Here's [/URL]a usefull thread by ~s.o.s~.

Member Avatar for addy999
0
124
Member Avatar for danejar

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

Member Avatar for Nick Evan
0
130
Member Avatar for fox_racing

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

Member Avatar for Fungus1487
0
106
Member Avatar for alcoheca

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

Member Avatar for Narue
0
264
Member Avatar for alcoheca

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

Member Avatar for Nick Evan
0
864
Member Avatar for sujithfem

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

Member Avatar for Nick Evan
0
95
Member Avatar for sugarflaps

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

Member Avatar for WaltP
0
282
Member Avatar for kano

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

Member Avatar for Ancient Dragon
0
373
Member Avatar for aztec101666

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

Member Avatar for joshua.tilson
0
206
Member Avatar for mae ann

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

Member Avatar for jbennet
0
295
Member Avatar for RohitSahni

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[])` …

Member Avatar for RohitSahni
0
555
Member Avatar for badbloodyeyez

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 …

Member Avatar for Nick Evan
0
661
Member Avatar for Pačo

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

Member Avatar for Pačo
0
122
Member Avatar for imran_s

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

Member Avatar for Aia
0
4K
Member Avatar for lydia21

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

Member Avatar for hopalongcassidy
0
155
Member Avatar for rupert7405

Do you have any programming experience? If not: vb.net is not that hard (..) to learn, but my personal favourite is C++ Niek

Member Avatar for jwenting
0
19
Member Avatar for nurulshidanoni

[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

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

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!

Member Avatar for The Dude
0
199
Member Avatar for Alethea

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 …

Member Avatar for Narue
0
136
Member Avatar for zandiago

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

Member Avatar for Nick Evan
0
195
Member Avatar for numbskull-1

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

Member Avatar for numbskull-1
0
71
Member Avatar for docdoc

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

Member Avatar for Ancient Dragon
0
108
Member Avatar for manojkumar2004

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?

Member Avatar for Nick Evan
0
69
Member Avatar for harshalone

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.

Member Avatar for jaepi
0
132
Member Avatar for RohitSahni

[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

Member Avatar for n.aggel
0
86
Member Avatar for eranga262154

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; } …

Member Avatar for eranga262154
0
1K
Member Avatar for jrice528

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 …

Member Avatar for AnthIste
0
138
Member Avatar for clski1973

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 …

Member Avatar for WaltP
0
145
Member Avatar for still_learning

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 …

Member Avatar for WaltP
0
129
Member Avatar for eranga262154

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]

Member Avatar for eranga262154
0
113
Member Avatar for Teachingmyself

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

Member Avatar for thunderstorm98
0
150
Member Avatar for happygeek

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

Member Avatar for Dani
0
610
Member Avatar for mattyd

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 …

Member Avatar for gaasha
0
1K
Member Avatar for sadaka

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'

Member Avatar for sadaka
0
167
Member Avatar for quintoncoert
Member Avatar for complete

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

Member Avatar for Ancient Dragon
0
168
Member Avatar for christina>you

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

Member Avatar for Narue
3
892
Member Avatar for joshSCH

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

Member Avatar for Dani
0
819
Member Avatar for mathgirl

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

Member Avatar for ndeniche
0
116
Member Avatar for Thinka

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

Member Avatar for Nick Evan
0
148
Member Avatar for Dani

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 …

Member Avatar for Nick Evan
0
287
Member Avatar for Radons

So you've bumped a two year old thread to say: tolong convert pascal ke C++..... What does that even mean?

Member Avatar for Radons
0
227

The End.