6,741 Posted Topics

Member Avatar for bumsfeld

>I am elated, exhilarated, jubilant, overjoyed, ecstatic and happy! Well, congratulations. But keep in mind that it isn't how many posts you have, rather what you've done with your posts. For example, I respect Ancient Dragon far far more than, say, christina>you because his posts are focused on helping people …

Member Avatar for GrimJack
3
200
Member Avatar for #include<DAN.h>

>I was just wondering if there was another way to out put text besides cout? You can use cerr, it's normally pointed to the same location as cout. You can also use the standard C output functions, but that can open an unexpected can of worms when it comes to …

Member Avatar for Duoas
0
5K
Member Avatar for chococrack

>I ended up having to re-route what I was trying to accomplish. What were you trying to accomplish? The way I'm reading your problem, you're confused about what [ICODE]this[/ICODE] is. A pointer to the current object is always available from a non-static member function; you don't have to pass it …

Member Avatar for Narue
0
280
Member Avatar for jeevsmyd

>Anyone please let me know the main differences between TC++ and VC++? They're too numerous to list, especially considering the fact that Turbo C++ 3.0 is ancient and Visual C++ 2008 is state of the art. >how can i make a simple programme written in tc++ run in vc++ Post …

Member Avatar for Narue
0
172
Member Avatar for Ed Lata

[quote]I've just got a suspicion that my cloned version of XP Professional has never connected with the mother ship and may be trying desperately to phone home. (I actually own a purchased, registered version but wanted to try this one since it was very reasonable in price.)[/quote] Daniweb's rules specifically …

Member Avatar for Narue
0
217
Member Avatar for jeevsmyd

>what is the difference between return 0 and return(0) ? Personal preference. Redundant parentheses are allowed, and the effect is the same.

Member Avatar for Sci@phy
0
655
Member Avatar for Talli

>i write viod main coz it saves me tym from writing return = o The return statement is optional in standard C++, so void main actually [I]costs[/I] you an extra keystroke. >so what actualli is the difference ????? void main isn't guaranteed to work, int main is. >whats the big …

Member Avatar for Talli
0
131
Member Avatar for peter_budo

>mean tutor will acceppt Unlikely. I posted an implementation of itoa just this morning that may help you, search the forum and you'll find it.

Member Avatar for Talli
0
288
Member Avatar for ~s.o.s~

>many make a mistake of reporting something which they don't want to I haven't seen a statistically significant number of reports like this. The correct reports are the majority, followed by a small number of reports where the reporter confused the "Report Bad Post" link with the "Reply" button. >also …

Member Avatar for ~s.o.s~
0
152
Member Avatar for anthonyms666

>But with this Windows operating system, there is absolutely NO WAY >that they make it easy to just poke away and start programming, like >I used to do with BASIC. If you keep comparing modern programming to what you used to do with BASIC, you'll likely not end up happy. …

Member Avatar for GrimJack
0
106
Member Avatar for DemonGal711

>It is sorta implied I write a program You can compile the implementation file without writing anything else. However, in some cases parts of a class won't be compiled (and thus won't throw errors if there's something wrong) unless you actually use them. So for a complete test you should …

Member Avatar for DemonGal711
0
88
Member Avatar for sinrtb
Member Avatar for freelancelote

Not without resorting to non-portable solutions. Just do what everyone else does and don't lose the size that was passed to the allocation function.

Member Avatar for freelancelote
0
126
Member Avatar for san_sarangkar
Member Avatar for Aia
0
151
Member Avatar for san_sarangkar

If your definition of "help" equates to "do the work for me", no. Why don't you go off and try to come up with something on your own before you start begging for "help"?

Member Avatar for Freaky_Chris
0
195
Member Avatar for DanDaMan

>Does the amount of comments written in the source code increase the size of the >final executed file or make the program any slower, even by a microsecond? No, comments are stripped from the source during compilation.

Member Avatar for Denniz
0
366
Member Avatar for rishabh2011

You're not going to be editing the file directly. Instead use edit it in memory and then save back to the file. As for editing directly in the console window, you're SOL and need to get creative unless you use some non-standard form of controlling the console (such as pdcurses).

Member Avatar for Narue
0
107
Member Avatar for anuj_sharma

>I have completed the basic concepts of C and C++. I doubt that. C is very nuanced, to the point where you could have years of both heavy reading and practical experience, and still be surprised. C++ is a beast, where the "basic concepts" are both broad and deep. Your …

Member Avatar for Narue
0
99
Member Avatar for blaze5488

>i was trying to count the letters until i got to the space in between "Adam Sandler" and then >return that as FN (aka first name) and then make all char's after the space be LN (aka last >name). That's a reasonable solution. It looks like you're using a non-standard …

Member Avatar for blaze5488
0
98
Member Avatar for PPP1

>All loops are same in both the languages so why they are different for each other? Why is Perl different from C++? They both have a for loop with the same syntax. 1) Comparing the syntax of a single feature isn't a good way to compare languages. 2) C++ is …

Member Avatar for Narue
0
158
Member Avatar for Jennifer84

It's exactly the same: [code=cplusplus] List<List<String^>^>^ vec = gcnew List<List<String^>^>(); [/code] Don't forget to use gcnew for each of the sublists too, and feel free to simplify the syntax using typedef as has already been shown.

Member Avatar for Jennifer84
0
169
Member Avatar for Stringman

>I think I could reduce my pointer headaches if only I could understand pointers better. If you're having trouble wrapping your head around pointers, chances are good that you're thinking too hard. Beginners tend to overcomplicate the concept of pointers into some massively difficult thing. >Somewhere in memory I've declared …

Member Avatar for bhoot_jb
0
136
Member Avatar for Barvik

The idea is to read what the << operator writes. In this case, your << operator writes a comma separated list of the values, all wrapped in brackets. So if you have the following matrix: [code] {0, 1, 2, 3}, {4, 5, 6, 7} [/code] The output would be "[0,1,2,3,4,5,6,7]". …

Member Avatar for grumpier
0
122
Member Avatar for jesie0405

>i know the output for the 1st case is wrong because it ends up showing in reverse You're extracting the digits from least significant to most significant, and printing in the same order. Of course it'll end up showing in reverse. You need to figure out a way to store …

Member Avatar for jesie0405
0
80
Member Avatar for jadedman

C++ doesn't support graphics natively. You need to determine which third party graphics library (SDL, Qt, Win32, etc...) you want to use, then your question can be answered.

Member Avatar for jadedman
0
88
Member Avatar for badbloodyeyez
Member Avatar for badbloodyeyez
0
69
Member Avatar for JackDurden

>How do you find out if ThingType thing is in the list? Loop through all of the nodes and stop when you have a match. It's a basic linear search: [code=cplusplus] bool TheList::search ( ThingType thing ) { Node *it = listPtr; // Assuming your list is terminated with a …

Member Avatar for Narue
0
75
Member Avatar for Clockowl

>fread() doesn't work on text files, I've experienced and then been told ;-) Whoever told you that is wrong. fread works fine on text streams. >suppose I use fseek, ftell, to get the filesize of a file, is that size+1 the correct >size for the buffer to read in the …

Member Avatar for WaltP
0
450
Member Avatar for opposition

strtok isn't that smart. It takes the delimiters you give and breaks up a string based on those delimiters, nothing more. If you want more advanced parsing, you're on your own. If you'd like advice, I'll be happy to help, but you need to be more specific about your needs. …

Member Avatar for Narue
0
153
Member Avatar for FtKShadow

The assignment wants you to start at x and add each number to a sum while counting up to y, like so: [code] sum = 0 while x < y do sum = sum + x x = x + 1 loop [/code] Compare that to your current code and …

Member Avatar for Salem
0
192
Member Avatar for Jennifer84

[quote=Sky Diploma] Well You can use the sort function to list and get the max value . For that you will need to write a bool comp() function for your datatype. Comparison function that, taking two values of the same type than those contained in the list object, returns true …

Member Avatar for Jennifer84
0
205
Member Avatar for Jennifer84

Presumably by go managed .NET you mean use the String class instead of std::string. If so, the LastIndexOf method is what you're looking for. On a side note, do you even know that MSDN exists, or are you using the people on Daniweb as your personal programming reference?

Member Avatar for Jennifer84
0
152
Member Avatar for Clockowl

>How would I reuse functions in C? The easiest way is to create a header file with the declarations and link to a .c file with the definitions. Download one of the libraries [url=http://eternallyconfuzzled.com/jsw_home.aspx]here[/url] for a good example of that technique. Using Code::Blocks all you have to do is add …

Member Avatar for Clockowl
0
107
Member Avatar for gregorynoob

>I vaguely remember that there's a round() function in there somewhere. C99 added a bunch of stuff, including a round function. However, the signature doesn't match what the OP is talking about, so I'd guess it's a compiler extension. >i was wondering if someone knows what library it comes from …

Member Avatar for ArkM
0
180
Member Avatar for geemicah

Please don't attach or link to code if it can be more easily embedded in your post. A 70 line program is short enough to fit, and it makes helping you easier. >didnt give me the accurate answer This is your problem: [code=cplusplus] final_grade=a+b+c/3; [/code] You want an average, which …

Member Avatar for ArkM
0
146
Member Avatar for andyT

>however, I want to do the other way around, copy >the values already in a vector into the array "current". That's completely opposite from everything else you've said thusfar. Allow me to summarize: You: "I want to assign a dynamic array to a vector." Us: "Here's how you do it." …

Member Avatar for andyT
0
227
Member Avatar for Kplusplus

Start by doing the in-memory parts and then you can add serialization to file once it working the way you want. This way you can incrementally add features and also be able to prove to us that you're actually working when you ask for help on the file I/O parts. …

Member Avatar for VernonDozier
0
933
Member Avatar for mzdiva041986
Member Avatar for justinlake888

Use whichever makes more sense. In this case it's a counted loop, which is what the for loop syntax was designed to handle.

Member Avatar for Sci@phy
0
99
Member Avatar for scholar

>there is yet another problem for you... I've already solved that problem. Perhaps you meant to say "This is my homework". >Now we need a program that can choose the specified number of >words say n from this word in all possible ways and displays them As much as it …

Member Avatar for Sci@phy
0
111
Member Avatar for ShadowOfBlood

You run the counting loop for every iteration of the loop that searches for '$'. Try merging the two loops into one: [code=cplusplus] while (word != '%') { //... for (count = 1; word != '$' && count <= 7; count++) { //... } //... } [/code]

Member Avatar for ShadowOfBlood
0
1K
Member Avatar for omdnaik

>If yes, well, you could start with c++ I guess it's a good thing C++ was invented, otherwise all C programmers still would be at a loss of what to do after learning basic data structures. :icon_rolleyes: Do you really only think of C as a path to C++?

Member Avatar for ssharish2005
0
163
Member Avatar for Matotore

Looks like an attempt at C++/CLI via C#. >am using vb 6.0 Um, is your code failing to compile? I'd imagine that it is. :icon_rolleyes:

Member Avatar for Matotore
0
120
Member Avatar for christina>you

>What is that mysterious dark energy or matter surrounding us? A placeholder theory until we can explain the effects of the universe that brought about the theory. >Could it be the presence of God...? It could be anything, though the "presence of God" tends to be an explanation that halts …

Member Avatar for GrimJack
0
2K
Member Avatar for ART01

Generally when working with arrays like this, you should be taking two size parameters: one for the number of filled slots, and one for the capacity. That way if the array is full you can throw a proper error. So option #1 is to change the way your function is …

Member Avatar for ART01
0
108
Member Avatar for makubexiii

>Is there no way that I can use gets() or scanf() in this? There's no way to use gets safely, but if your teacher is too ignorant or stubborn to recognize that, you really have no choice but to use it (keeping in mind that it's a very bad practice). …

Member Avatar for makubexiii
0
140
Member Avatar for saulzi

>This is my first post All the more reason to take care in following the rules. >and it is a reply to a old one Not anymore, I've done what you should have and started a new thread. >but if its any help to anyone it can be done quite …

Member Avatar for stilllearning
0
153
Member Avatar for chern4ever

The remainder operator doesn't work with floating-point types. Look up the fmod function in <cmath> for getting the remainder of floating-point division.

Member Avatar for chern4ever
0
329
Member Avatar for TheMoosiah

I've always been partial to table-based solutions, especially when the list of choices gets longer than about five. Excessively long if chains and switches are irritating to work with. For example: [code=cplusplus] #include <algorithm> #include <string> namespace { std::string face[] = { "A", "2", "3", "4", "5", "6", "7", "8", …

Member Avatar for VernonDozier
0
96
Member Avatar for godlike111

>but godlike111 asked why? Actually, the OP asked "what". ;) But the "why" is because that's a specific constraint in the standard. The fundamental "why" is because pointers are maps to a location, not the location itself. Optimization concerns aside, there's no reason why a pointer couldn't be represented by …

Member Avatar for Narue
0
2K

The End.