15,300 Posted Topics

Member Avatar for faaz

>>Do not use nickel and half-dollar coins. half-dollars I can understand because they are not very common. But nickels??? :icon_eek: As a customer I would not like it if the cashier gave me seven pennies when he/she had a nichel in the drawer.

Member Avatar for restrictment
0
772
Member Avatar for i_luv_c++

convert the integer to std::string (use stringstream for that), insert the commas, then display the string. There is no function that will do it for you. If you use C#, VB.NET or C++/CLR you're in luck because [URL="http://msdn.microsoft.com/en-us/library/0c899ak8.aspx"]WriteLine() [/URL]can do it.

Member Avatar for i_luv_c++
0
163
Member Avatar for newcmp

do you have to use a vector? It would be simpler to just use a std::string.

Member Avatar for Ancient Dragon
-1
88
Member Avatar for miles.85

java is pretty much operating system independent, meaning write it once and run it with no further action on any os that supports java. C and C++ languages are not -- that is you have to compile it for each target operating system. On MS-Windows you could write the C …

Member Avatar for miles.85
0
220
Member Avatar for Dabareah

That file does not contain a class names CNode. And post your attempt to solve the problem.

Member Avatar for Ancient Dragon
0
70
Member Avatar for Takarakujin

pass it the same as anything else [code] void foo(char *c) { } int main() { char c = 'A' foo(&c); } [/code]

Member Avatar for Ancient Dragon
0
102
Member Avatar for sonai4u

Deposit $10,000.00 USD into my PayPal account and I will do it for your. Otherwise, spend some midnight oil and do it yourself.

Member Avatar for Ancient Dragon
-7
498
Member Avatar for kendaop

an unsigned char variable is only a value between 0 and 255 (0 and 126 signed). That means it can only contain a single numeric digit -- if you look at [URL="http://www.asciitable.com/"]any ascii chart[/URL] you will see that the digit '0' has a numeric value of 48, the digit '1' …

Member Avatar for Dave Sinkula
0
5K
Member Avatar for techie929

you mean something like this? You can either provide a file name on the command line or redirect a file into the program like this: [icode]myprog <main.cpp[/icode] [code] void foo(istream &in) { string line; while( getline(in, line) ) cout << line << '\n'; } int main(int argc, char* argv[]) { …

Member Avatar for Duoas
0
592
Member Avatar for harmony217

Yes of course it can be done. Suggest using [URL="http://curl.haxx.se/libcurl/"]cURL library[/URL].

Member Avatar for Ancient Dragon
0
47
Member Avatar for moshe12007

Welcome to 32-bit programming :) [URL="http://www.beyondlogic.org/porttalk/porttalk.htm"]Read this article[/URL].

Member Avatar for moshe12007
-1
61
Member Avatar for darkagn

[QUOTE=Paul Thompson;1133244]And also give them the power to be able to ban users with spammy sigs! That ReplicaWatches thing is really annoying me :S[/QUOTE] If they did that then DaniWeb would lose 95% of its members, including yourself.

Member Avatar for Ancient Dragon
0
469
Member Avatar for anAppBuilder

What language did you use to write that program? In C and C++ there are a few win32 api function calls you need to make in order to make the program run with admin privileges. See [URL="http://msdn.microsoft.com/en-us/library/aa379306%28VS.85%29.aspx"]this article[/URL] and the links at the bottom.

Member Avatar for anAppBuilder
0
285
Member Avatar for aceswildab1

go back to school and get a degree. If you can't get a degree because you can't do the work then just to go McDonalds and flip hamburgers for the rest of your life. Also check with some of the temp employment agencies in your area to see if you …

Member Avatar for Lumi4real
0
305
Member Avatar for xavier666

The rule is -- one free() call for each malloc() or calloc() call. You can not free() something that was never malloced. In the case of the linked list, each node of the list was allocated by calling malloc(), therefore each node must be destroyed by calling free(). In the …

Member Avatar for Ancient Dragon
0
98
Member Avatar for mrk258

[QUOTE=mrk258;1132812]my keyboard is not working with window vista[/QUOTE] [URL="http://www.youtube.com/watch?v=PFcL6hiyyuc&NR=1"]Here is a Tutorial [/URL] that shows you how to fix it.

Member Avatar for Ancient Dragon
-1
31
Member Avatar for johndoe444

On line 8 print the value of s on each iteration of the loop then you can see why you get that output. If you use a scientific calculator you will see that (1 & 128) is 0. Then 128 > 1 is 64. (1 & 64) = 0. 64 …

Member Avatar for Dave Sinkula
0
94
Member Avatar for Coomanperson

First move lines 15, 24 and 26 down into fillcities() function. There is no reason for ifstream to be global. You can combine lines 38 and 39 like this: [icode]while( getline( infile, CityName ) )[/icode]. There is no need to use eof() like that because it doesn't work the way …

Member Avatar for Coomanperson
2
173
Member Avatar for sleepybug

Don't type in all upper case because it means you are screaming and yelling at us. You need to understand pointers if you want to understand that program. [URL="http://daweidesigns.netfirms.com/cgi-bin/pointers.php"]Here is a good paper[/URL] on pointers by DaWei

Member Avatar for sleepybug
-2
158
Member Avatar for Ashish29may
Member Avatar for lrh9

[QUOTE=GrimJack;1105420] Plus there is the whole 'separation of church and state' thing[/QUOTE] There is no such thing as "separation of church and state". The US constitution just prevents the US government from passing certain kinds of laws concerning religion, it does not prevent it from practicing a religion. And the …

Member Avatar for jwenting
1
768
Member Avatar for i_luv_c++

You don't use strlen() to get the length of std::string object -- use its length() method [code] if( f.length() < s.length() ) { swap(f,s); } [/code] Now do that for all combinations if the strings f, s, t, and fo; Also, a much better way to format your code is …

Member Avatar for i_luv_c++
0
149
Member Avatar for lashatt2

My guess is that you are trying to create the table every time you run that program. Delete line 5 and try it again.

Member Avatar for mitrmkar
0
99
Member Avatar for atticusr5
Member Avatar for Ancient Dragon
0
76
Member Avatar for blackmagic01021

zlib I think was written in C language, not C++. If you want to compile it as c++ then there will most likely be a lot of places that require minor changes, such as typcasting void* to something else, such as [icode]zcpr.next_in = (Bytef *)FilePtr;[/icode]

Member Avatar for blackmagic01021
0
125
Member Avatar for COKEDUDE

what are the error message(s) ? lines 9 and 19: why did you stick those returns in the middle of those if statements? That makes line 10, 11, 20 and 21 unusable because they can never be executed. Mising } between lines 12 and 13.

Member Avatar for COKEDUDE
0
184
Member Avatar for josh06

12 years old??? you should be skateboarding and hanging out with kids your own age, not saying by yourself if your house at a computer. This is the time for you to be a kid and learn how to socialize with other people. BTW: unix operating system was written in …

Member Avatar for josh06
0
118
Member Avatar for casjackkwok2001

just add showArray() function call on line 51 of the code you posted, just before the end of that do loop.

Member Avatar for vmanes
0
262
Member Avatar for CppBuilder2006
Member Avatar for WaltP
-4
148
Member Avatar for newcuser

>> setw( 10 ) << 3 That, in C would be [icode]printf("%10d", 3);[/icode] >> setprecision( 2 ) That's the same as [icode]printf("%.2f", sales[ i ][ j ]);[/icode]

Member Avatar for mitrmkar
0
183
Member Avatar for mebob

In C and C++ languages array subscripts begin with 0, not 1. So line 24 should be [icode]t[0] = ...[/icode]. Other lines in your program need to be adjusted accordingly, such as use t[0] and t[1].

Member Avatar for vmanes
0
441
Member Avatar for katwalatapan

If you know the buffer will need 8 seconds of data then why not just allocate it all at the same time? Calling realloc() will work too, but will be more time consuming than allocating it all at the same time.

Member Avatar for katwalatapan
0
185
Member Avatar for Eternity[LK]

Are you executing bcc32.exe from a command prompt or from Windows Explorer? You can't do it with Explorer.

Member Avatar for Eternity[LK]
0
143
Member Avatar for hno

I suppose you could multiply everything by 100 do the integer division, then divide the final result by 100. But 14.3 can not be stored as an integer, so I assume you will just want to print it, such as [icode]printf("%.1f\n", (float)1430/100);[/icode]

Member Avatar for Ancient Dragon
0
46
Member Avatar for vijaysoft1

You can try MinGW, which is the MS-Windows port of g++. Download it directly or get it with Code::Blocks IDE. If MinGW doesn't support the files then you will have to redesign some parts of your program.

Member Avatar for Ancient Dragon
0
89
Member Avatar for suta6

[QUOTE=suta6;1079803]Question 1: [CODE]main() {int i=-3,j=2,k=0,m; m=++i||++j&&++k; printf("\n%d%d%d%d",i,j,k,m); } [/CODE] ans is -2201 how?[/quote] There are no spaces in that printf() statement to separate the numbers.

Member Avatar for WaltP
-2
90
Member Avatar for ankara84

[QUOTE=Daishi]Woah woah woah. What's so illegal with 'i=i++'? Wouldn't it just try to increment i, and then set i equal to the original value of i, making the ++ do effectively nothing? That's what it does when I try it, but I don't have a straight C compiler handy.. -Fredric[/QUOTE] …

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

read each line of the file, then search the line for each of the key words you want to use. For example [code] std::string line; if( line.find("VELOCITY") != string::npos) { // blablas } else if( line.find("LAT_1") != string::npos) { // blabla } // etc. etc. [/code] >>I'm just beginning to …

Member Avatar for Kevin_160
0
89
Member Avatar for JustSuds

I have the output window always docked at the bottom of the screen so that its always visible and not a popup. On my setup what you are calling the Error List window is the same as the output window, that is the error list is shown in the Output …

Member Avatar for JustSuds
0
137
Member Avatar for Stefano Mtangoo

[URL="http://www.google.com/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&source=hp&q=c%2B%2B+makefile+tutorial&btnG=Google+Search"]Tutorials[/URL]

Member Avatar for jonsca
0
98
Member Avatar for Narue

[b]The Dude[/b] Every community needs a jester and The Dude acts in that capacity at DaniWeb. He always puts a big smile on my face with his humerous and sometimes informative posts in the Geek's Lounge. The Dude is to DaniWeb that Jerry Lewis, Lucille Ball, Jonathan Winters, Benny Hill …

Member Avatar for jonsca
2
513
Member Avatar for lamoracke

google is your friend. [URL="http://www.macs.hw.ac.uk/~rjp/Coursewww/Cwww/tree.html"]Here is a binary tree program[/URL] written in C that was at the top of the google links. All you have to do with it is change the tree nodes to hold strings instead of integers and add an integer counter to count the number of …

Member Avatar for holocron
0
94
Member Avatar for shankhs

>>How to do fancy stuffs using C/C++? Go to [url]www.codeproject.com[/url] and there you will find hundreds of programs/tutorials that do fancy stuff.

Member Avatar for tkud
0
626
Member Avatar for cnidhi007

Welcome to DaniWeb. Where are you from anyway? Never heard of the name Nidhi before.

Member Avatar for julialouis2010
0
46
Member Avatar for garthmiller

[URL="http://cdburnerxp.se/"]This program[/URL] works for me, but I don't know if it will read those MAC files or not.

Member Avatar for vein27
0
186
Member Avatar for lllllIllIlllI

San Francisco is "overseas" ??? OMG! Don't be surprised if you see a lot of men holding hands with other men in that city because it's one of the biggest gay cities in the USA. In 6 weeks it will be sprint time there so the weather should be pretty …

Member Avatar for vmanes
0
154
Member Avatar for mrnutty

[QUOTE=firstPerson;1116756]Sure potential is an important quality, but would you hire a dull person to make a software for you company, even if that dull person has potential? Or would you hire a "*smart" person for that same job? Remember its you ass on the line. ------------------------------------------------------------------------------------------ * whatever smart means …

Member Avatar for vaultdweller123
0
1K
Member Avatar for VilePlecenta
Member Avatar for VilePlecenta
0
139
Member Avatar for rEhSi_123

You have to specify the full path to the new folder, otherwise it will just get created in the current working directory. [icode]sprintf(dirname,"/usr/include/somewhere/test%d",i);[/icode]

Member Avatar for WaltP
0
2K
Member Avatar for ITKnight

I have not seen a football game (EU version, not American) since mid 1970s when I was stationed at RAF Mildenhall, Englahd. At that time it was just as much fun watching the fans get into big fights as it was watching the game. Do the fans still do that???

Member Avatar for HelloMe
0
202

The End.