2,045 Posted Topics

Member Avatar for Derek Elensar

[icode] input[8] [/icode] is not the last member of your array, [icode] input[7] [/icode] is. When you declare the array you put the size, when you use the array, you put the index. After taking in the input, you could say [code] if(input[7] != '\0') input[7] = '\0' [/code] What …

Member Avatar for Derek Elensar
0
180
Member Avatar for littleleaf

The sizeof() operator is giving you the size of the pointer named "buffer", which is 32 bits (4 bytes). Just use bufflen for the size of the buffer in the get() call.

Member Avatar for jonsca
0
171
Member Avatar for duliduli556

Check out [url]http://drdobbs.com/cpp/229218807?queryText=counting+references[/url] from Dr. Dobbs last month, I don't know if it's along the lines of what you are looking for. And yes, I agree with thekashyap, at least tell us what you've Googled about.

Member Avatar for jonsca
0
80
Member Avatar for mrnutty

[QUOTE=happygeek]Can I just add that what I'd like to achieve is a night of passion with Avril Lavigne. What's stopping me is the wife...[/QUOTE] Why choose? ;)

Member Avatar for susheelsundar
2
284
Member Avatar for Roo0ond

[quote]You have made a way to resolve code half-life, but missing something I want to help it .. Fuvction which solving the equation of the third degree in how to enter transactions have, I mean how can I insert s q v g [/quote] I apologize, but I only get …

Member Avatar for Roo0ond
0
58
Member Avatar for tangentplane
Member Avatar for thekashyap
1
4K
Member Avatar for KansaiRobot

Since you're not asking about C++ explicity, do you have access to Matlab? There is a command called quiver3 that might be exactly what you are seeking ([url]http://www.mathworks.com/help/techdoc/ref/quiver3.html[/url]). It looks like octave might have something similar as an add on ([url]http://octave.sourceforge.net/octave/function/quiver3.html[/url]).

Member Avatar for KansaiRobot
0
192
Member Avatar for hazila

Take a look at the example at the bottom of [url]http://www.cplusplus.com/reference/string/string/find/[/url].

Member Avatar for Ancient Dragon
0
117
Member Avatar for usustarr
Member Avatar for geekme

Please make an attempt at the code and post it with specific questions.

Member Avatar for L7Sqr
0
110
Member Avatar for penguino138

Which windowing library are you going to use? I think Dev has the Win32 API included (good tutorial here [url]http://www.winprog.org/tutorial/[/url]). You might be better off starting with another GUI option like Qt (which will come packaged with a newer version of g++ than you have with DevC++).

Member Avatar for Stefano Mtangoo
0
1K
Member Avatar for PlyrJames791

Unarchive it to a directory. There's a MSW directory that contains a VS project. Open that up and build it. Check the lib directory for the lib files (it probably does a debug build initially, so you may have to do a release build later). After that's all built, go …

Member Avatar for kiran_ur_frnd4u
0
1K
Member Avatar for highflyer8

I'm sure no one would get upset if you did more than the allotted set. My perception is that most lecturers here in the states have a predefined set of learning objectives (put forth by the department or a curriculum committee), and they have to try to adhere to that …

Member Avatar for jonsca
0
52
Member Avatar for Nicko_FaTe_

That version of getline needs a streamsize, so for example [icode]inFile.getline( PetID[counter].status, ' \n ');[/icode] should be [icode] inFile.getline( PetID[counter].status,6, ' \n '); [/icode] (6 being the size of the status array) and really you can leave off the '\n' as that is the default. You're not taking in the …

Member Avatar for jonsca
0
133
Member Avatar for caut_baia

That's a great quote for your sig: [icode]"Nobody goes there anymore; it's too crowded."[/icode] -Yogi Berra

Member Avatar for royng
3
236
Member Avatar for frogboy77

[quote]I have ADD[/quote] I'm sure you've got a few other opcodes too, like MUL or something. I'm going to duck to avoid whatever you have just thrown at me. Me, I do it for the parties at the mansion in Long Island, all the fast cars, speedboats, caviar...a chance to …

Member Avatar for jon.kiparsky
0
269
Member Avatar for jshoot
Member Avatar for jshoot
0
272
Member Avatar for sparkthesunoff

Your inner loop is going to control the columns (it's a bit confusing because people usually specify dimensions as m rows by n columns, but you've done the opposite), so the [B]inner[/B] (j loop) should go to [B]m[/B] and your [B]outer[/B] (i loop) loop should go to [B]n[/B]. So your …

Member Avatar for jonsca
0
103
Member Avatar for Kapilxcb

Change the inner loop to [icode] for(eq_2 = head; eq_2!=nil; eq_2 = eq_2->tail) [/icode] (substitute whatever your head pointer actually is), that way the second loop gets reset to the beginning of the second list. I think that's what you're trying to do...please clarify if it's not.

Member Avatar for jonsca
0
147
Member Avatar for C.Cen

Any for loop can be transformed into a while loop: [code] for(int i = 0;i<max;i++) { //stuff } is equivalent to int i = 0; while(i<max) { //stuff i++; } [/code]

Member Avatar for DHEERESSAA
0
244
Member Avatar for sreekiranws

The quick and dirty way is to save them both out to text files (with Save As...) and go the getline route. The 07 and later .docx is XML based, but it's still a binary file, I believe.

Member Avatar for jonsca
0
213
Member Avatar for royng

Someone has apparently heard your request and started one moments ago on [URL="http://embed.mibbit.com/?userListWidth=50&server=irc.daniweb.com%3A6667&chatOutputNickWidth=80&channel=%23Daniweb"]IRC[/URL]. ;) (I can't take the credit, it's been there already)

Member Avatar for royng
0
435
Member Avatar for subith86

You need to "forward declare" FriendClass at the top of MyClass.h. On line 6, put [icode] class FriendClass;[/icode]. This tells the compiler that such a thing exists so it doesn't complain when it runs into the symbol in the MyClass declaration.

Member Avatar for jonsca
0
2K
Member Avatar for newwbee

There's a fantastic way to check the output of any source code ;) Please explain your rationale for your answers, they are not correct.

Member Avatar for jonsca
0
194
Member Avatar for highflyer8

Train yourself bit by bit to also appreciate the "big picture" ideas. What is it telling you about inheritance? What are some of the relationships between classes? If you focus too much on the minutiae, you'll miss the overall point, which is the thing that is likely to be tested …

Member Avatar for royng
0
179
Member Avatar for digitup1

I'm sure people will come up with other methods that are better (or better suited for the situation), but look at [url]http://cplus.about.com/od/howtodothingsi2/a/timing.htm[/url] at least for a reference as to some of the issues, and perhaps how to get a little more resolution out of the timer, YMMV. One thing that …

Member Avatar for template<>
0
190
Member Avatar for Mr.UNOwen

For the first part, you'll have to use a global hook, see [url]http://www.daniweb.com/software-development/cpp/threads/292475[/url] and the related MSDN. For the second part, check if certain values have been defined (an older thread, so I don't know if there are new versions): [url]http://social.msdn.microsoft.com/forums/en-US/vcgeneral/thread/3abd4c16-d412-4dbf-a958-eb3b8c05b4bf/[/url]

Member Avatar for jonsca
0
132
Member Avatar for royng

[QUOTE=jwenting] Stalin said that "religion is the opiate of the masses", but in our society that place has been taken by crackpot "supernatural phenomenon" and conspiracy theories.[/QUOTE] It was Karl Marx. Lenin said something like it later on. [url]http://en.wikiquote.org/wiki/List_of_misquotations[/url]

Member Avatar for royng
0
139
Member Avatar for iamcreasy

See [url]http://en.wikipedia.org/wiki/Stdlib.h#NULL[/url] as to some of the variants and rationale.

Member Avatar for template<>
0
19K
Member Avatar for clutchkiller

[quote]platform specific implementation[/quote] [quote]make system calls portable[/quote] If something is platform specific, then by definition it is non-portable. Just skip the "cls", it takes away control from the user and can, IMO, become annoying. If you need that kind of control, use a portable library like pdcurses. This thread is …

Member Avatar for Narue
0
2K
Member Avatar for bantex07

== does not work to compare strings in C (nor does >=). Use the strcmp function in the string.h header. Here's a reference [url]http://www.cplusplus.com/reference/clibrary/cstring/strcmp/[/url] (ignore that it's on a C++ site).

Member Avatar for WaltP
-2
153
Member Avatar for Sky Diploma

[quote] I was wondering if anyone could help me out on this library[/quote] Which library are you trying to use for the Bluetooth?

Member Avatar for jonsca
0
766
Member Avatar for opawix

Is it a sort you are looking for? Please try to be as clear as possible [icode] tnx guys for d help. any help. pls. im needing dis for my defend.[/icode] sounds like your texting your friends instead of asking colleagues for help.

Member Avatar for jonsca
0
172
Member Avatar for Jbvo

Think of the letters as having a place value, 'a' = 0, 'b' = 1, so "aa" is 0*25+0, "ab" is 0*25+1, "zz" is equal to 25*25 + 25 (check my math, lol). To get the value of a character, subtract 'a'. EDIT: arkoenig's got it (and in much nicer …

Member Avatar for Jbvo
0
312
Member Avatar for Ronnie147

[icode]break;[/icode] on 19 and 21 is taking you out of the loop completely, what you want to do is increment k and [icode]continue;[/icode]. Also, you employ something like [url]http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes[/url] because you're only testing for 3 factors.

Member Avatar for Zjarek
0
204
Member Avatar for Learath2

What is the actual assignment? Those are very large numbers to be using fundamental types. Perhaps your instructor wants you to implement a "BigInt" type class using arrays.

Member Avatar for jonsca
0
80
Member Avatar for efronefron

I looked around and ended up with the same information that you did, but read this [url]http://cboard.cprogramming.com/c-programming/55152-trouble-strndup-function.html[/url] (especially the post from Salem) about the compiler switch -ansi being incompatible with the non-standard functions (you don't use any switches in your example above, but I didn't know if the server had …

Member Avatar for efronefron
0
846
Member Avatar for Roo0ond

[quote] I hope this Mhaoti completions with me [/quote] I appreciate the fact that English is not your first language, but I have no idea what you are trying to say there. So what are you trying to do with this function? Take the integral of it?

Member Avatar for Roo0ond
-1
142
Member Avatar for MattWhitehead__
Member Avatar for Kumar_cr09

Check out something like [url]http://www.codeproject.com/KB/IP/csmtpconn.aspx[/url]. I've never used it, I just ran across it.

Member Avatar for Kumar_cr09
0
99
Member Avatar for CrumbledCookies

Resetting your counter to 10 at the bottom of the counter will cause it to run forever if you can't find the item, I'm not sure what you're trying to do there. I would copy/paste all of your code into a separate file and strip out all of the output …

Member Avatar for CrumbledCookies
0
359
Member Avatar for jmk5

You need at least an [code] [B]int main(void)[/B] { return 0; /*else compiler complains about falling off the end */ } [/code] Probably can trim out some of that, but this is a safe bet

Member Avatar for jonsca
0
5K
Member Avatar for jacob07

I don't understand what about "cond" makes it output the second line? (did you mean "second"?) How would you output the first? You'll have to take in arguments from the command line (look up "argc and argv" for lots of examples).

Member Avatar for jonsca
0
157
Member Avatar for aaronmk2

[icode]strcpy(dest,source) [/icode] copies the source to the destination EDIT: [icode] strcpy [/icode] returns the destination string, you're treating it like it returns a concatenated one. What you need is to [icode] strcpy [/icode] Scards into Tcards and then use [icode] strcat [/icode] to add Ncards to Tcards. Make sure Tcards …

Member Avatar for Lerner
0
110
Member Avatar for vineeshvs
Member Avatar for shylesh_kerala

[quote]after deleteing I want to show the array contents........ [/quote] That doesn't make one bit of sense. Also, why are you trying to delete the array multiple times, [icode] delete [] array; [/icode] takes care of it.

Member Avatar for Moschops
0
171
Member Avatar for user129

[url]http://beej.us/guide/bgnet/[/url] is one of the most referenced sources. I've never used it, so no guarantees. Other than that, make sure your fundamentals are sound before delving into the network programming. Have you worked in other languages before?

Member Avatar for jonsca
0
86
Member Avatar for dstoltz
Member Avatar for fadi_1234

Use a cast? C++ style: [code] double a = 1.40; int x = static_cast<int>(a); [/code] "C style" (still valid) [code] double a = 1.40; int x = (int)a; [/code] You will lose all digits after the decimal and it doesn't round, just truncates.

Member Avatar for fadi_1234
0
144
Member Avatar for TrustyTony

[quote]unless reputation in this forum doesn't count[/quote] Nope. Hehe.

Member Avatar for Dani
0
227

The End.