6,741 Posted Topics

Member Avatar for niki01

Why do so many students have trouble with round robin? It's not even a difficult concept, much less a difficult implementation. Yet every year (right around this time too), we're bombarded with one-liner questions by new members.

Member Avatar for Killer_Typo
0
156
Member Avatar for asilter
Member Avatar for vijayan121
0
361
Member Avatar for koolboy
Member Avatar for hectic

>no matching function for call to `getline' You probably forgot to include <string>.

Member Avatar for Narue
0
300
Member Avatar for Dha_King

>My problem is how to get the size of my array when its a dynamic array You allocated the array, you should know the size. In other words, there's no portable way to find the size of allocated memory given nothing but a pointer to it. You need to remember …

Member Avatar for Ancient Dragon
0
512
Member Avatar for C++Amanda

>Why doesn't it look good? Because a lot of us visit most of those forums, and seeing an identical thread on each one reeks of spamming and trolling for answers. >I don't see what it matters where else I get answers. It doesn't matter. What matters is that by asking …

Member Avatar for iamthwee
0
197
Member Avatar for fXp17

I'd start by using an array instead of N separate variables. What you're doing makes it difficult to handle the list elegantly. As for your code, it's very screwed up. ;) Here's the pseudocode for your problem: [code] constant N := 5 numbers [0..N] of integer # Load the numbers …

Member Avatar for Narue
0
99
Member Avatar for Bikram

>helos...!!! >wel am new to dis..!!! >but i hav a code to it...!!! >lets try out..!!!!! You have one of the most annoying writing styles I've seen. If you want people to treat you like anything but an irritating script kiddie, use proper English. The non-native English speakers will thank …

Member Avatar for Narue
0
124
Member Avatar for richace3

>I'm trying to get as many hits as I can to my website and I want to have >this program running while I'm not using my computer for other things. While not illegal, this is definitely unethical, and I'm reasonably sure most of us have a problem with your stated …

Member Avatar for Narue
0
161
Member Avatar for thyagarajan

>t2 = t1 + (2*60); // want a 2 minute timer >while( t1 < t2) How wonderfully pointless if you want a general solution. While time_t is an arithmetic type, the size and range are implementation-defined and contents are unspecified. The only thing you can assume is that you can …

Member Avatar for Ancient Dragon
0
350
Member Avatar for n.aggel

>so std::vector<bool> will occupy space:: number_of_elements*1bit?? No, [INLINECODE]number_of_elements * sizeof ( bool )[/INLINECODE]. The difference is that the size of bool isn't set in stone, and it's going to be at least sizeof ( char ) because char is the smallest addressable unit in C++. [Edit: Ignore the above. I …

Member Avatar for vijayan121
0
127
Member Avatar for zandiago

>error C2065: 'numz' : undeclared identifier Your code looks fine. Did you make any changes from what was posted originally? >warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data You can ignore this, but it's a good practice to match the type of whatever values you're …

Member Avatar for zandiago
0
201
Member Avatar for Draker44

>What do you guys think of the Sam's book? I don't trust any book that you can finish in 21 days, 24 hours, or 10 minutes or claims to be for dummies or idiots. They tend to gloss over important concepts (assuming the author is competent), but more often than …

Member Avatar for Narue
0
151
Member Avatar for annagraphicart

>anybody know an estimate of how much to expect to pay? My consultancy base rate is $250 per hour. That's fairly standard for high quality programmers, so if you want better prices, surf over to rentacoder.com and have the masses bid on your project.

Member Avatar for raananschwartz
0
74
Member Avatar for leetari

>How do I find data stored in a two dimensional linked list? Is this a hypothetical question, or do you really have to write such a function? My first inclination would be to count from 0 to row while traversing the outer list, then jumping into the inner list of …

Member Avatar for Narue
0
101
Member Avatar for icecube

>Any help? Yes, plenty. But you'll have to make an attempt first. No effort on your part results in no effort on our part.

Member Avatar for icecube
0
95
Member Avatar for BigFormat

>Is it possible to avoid the 26 rows if-else, and the horrible printf? Yes, if you're willing to generalize the solution and use up more storage to do it: [code] #include <ctype.h> #include <limits.h> #include <stdio.h> int main ( void ) { int lookup[UCHAR_MAX + 1] = {0}; int ch; …

Member Avatar for Salem
0
435
Member Avatar for cowboys111

>void main (void) [INLINECODE]int main()[/INLINECODE]. No excuses. >while (in<2000000000 && in>-2000000000) What requirement brought this about? Anyway, you only read one number and proceed to work only on that number. You need to read another number inside the loop.

Member Avatar for cowboys111
0
95
Member Avatar for militant880

If you're learning Java without a reference, get a reference. If you have a reference, READ IT! I mean, come on, how trivial does this have to be before you can figure it out on your own? Any book on Java will cover every single one of those questions. Not …

Member Avatar for no1zson
0
165
Member Avatar for Narue

>How can i convert a number to binary in c++ If you stare at it really hard, things will start to blur and when you turn your head, it'll start to look like binary in your peripheral vision.

Member Avatar for WaltP
0
255
Member Avatar for jacques95

You need a text editor that doesn't add formatting crap to the source files (which means Microsoft Word is out) and a compiler. If you're lazy (like me), you can get an IDE that combines a compiler and text editor (along with other tools). [url=http://msdn2.microsoft.com/en-us/express/aa700735.aspx]This[/url] is pretty user-friendly, but beginners …

Member Avatar for jacques95
0
144
Member Avatar for jack223

>This is not true data abstraction. Sure it is. The abstraction is the stack and its implementation, not the contents of the stack. Returning a copy of the top of the stack instead of a pointer to it makes no difference in how the stack works. Presumably the question is …

Member Avatar for vijayan121
0
192
Member Avatar for tralfas

>anyone have any experience with this? Bumping a thread is extremely rude and insulting to everyone because it presumes that your question is more important than all of the others when all questions have equal priority to those of us who are answering them. When someone feels confident in answering …

Member Avatar for Salem
0
193
Member Avatar for Drew06

Your main doesn't have a closing brace. You also can't have nested functions, so the use of even and odd in determine has to be done differently.

Member Avatar for Drew06
0
76
Member Avatar for teppuus

If you want the character representation of a digit, wrap it in single quotes: [code] if (studentId[3] == '1') cout << "Freshman "; else if (studentId[3] == '2') cout << "Sophmore "; else if (studentId[3] == '3') cout << "Junior "; else if (studentId[3] == '4') cout << "Senior "; …

Member Avatar for teppuus
0
109
Member Avatar for gaggu82

How appropriately vague. Well, assuming quite a few things about the list because you didn't specify, the common convention is this: [code] for ( node *it = head; it != 0; it = it->next ) std::cout<< it->data <<'\n'; [/code]

Member Avatar for Narue
0
63
Member Avatar for JoBe

>A) is the way I used the string and new operator correct for this little program? It looks fine, why do you ask? >B) is this <bad Ptr> related to a bad Pointer and what does that mean? It's just your debugger's way of saying that mName isn't ready to …

Member Avatar for JoBe
0
4K
Member Avatar for ziz_300

"Doesn't work" is the worst possible description of a problem. Maybe you should try being more specific.

Member Avatar for WaltP
0
88
Member Avatar for annagraphicart

Well, you can start by telling us what your compiler and OS are. :icon_rolleyes:

Member Avatar for Dave Sinkula
0
105
Member Avatar for annagraphicart

>if ( names1[i].score[i] == 0 ) score isn't a member of the std::string class, so you can't use the dot operator like this. You follow the same pattern quite a bit, but I'm not entirely sure I can anticipate what you were trying to do.

Member Avatar for annagraphicart
0
88
Member Avatar for teppuus
Member Avatar for teppuus
0
235
Member Avatar for abdullateef

>Is it right?? In theory. In practice it's more like this: [code] *( *( baseAddress + N ) + M ) [/code] Why? Because a two dimensional array isn't required to be strictly contiguous in memory. Pick any teacher and they'll tell you that the storage for a two dimensional …

Member Avatar for Narue
0
106
Member Avatar for purifier

>In a scenario where you had to choose between Operating Systems and Computer >Architecture, which would you have chosen keeping my field in mind? It really depends on what the operating systems class covers. Most likely it's going to be steeped in theory and minute details of OS design and …

Member Avatar for Ancient Dragon
0
164
Member Avatar for kazek

>The problem is that when I run the program instead of it showing >me the contents of the class file it just terminates. Probably because you've commented out all of the stub code that displays anything. The program isn't going to do something that you haven't written code to do. …

Member Avatar for Salem
0
3K
Member Avatar for Donnovan

Just like variables, functions have to be declared before you use them: [code] #include <iostream> using namespace std; [COLOR="Green"]float Omrekenen(float tempFahrenheit);[/COLOR] int main() { float tempFahrenheit; float tempCelsius; float Omrekenen; cout << "Geef de temperatuur in Fahrenheit: "; cin >> tempFahrenheit; tempCelsius =Omrekenen(tempFahrenheit); cout << "\n Dit is de temperatuur …

Member Avatar for Donnovan
0
200
Member Avatar for bizmey

>can anyone suggest any related topic with my degree in Software engineer. You just took the class for a whole year. How is it possible that you're incapable of picking a project that suits what you've learned?

Member Avatar for Ramy Mahrous
0
117
Member Avatar for Jaav

>In Visual basic express edition when I create a forms application I only get one file. That's because the IDE is hiding the rest of the files from you. There's a button on the solution explorer that disables hiding files. >I've heard a lot about the limitations of VB but …

Member Avatar for Narue
0
163
Member Avatar for pop007

>#include <iostream.h> I'll let that slide because you're using a compiler that's roughly the same age as dirt. >#include <conio.h> This I won't let slide. You have no reason to use conio, and I'll explain why shortly. >void main() { I don't care if the compiler lets you do it, …

Member Avatar for WaltP
0
106
Member Avatar for brijendramishra

>but its constructor is not called The constructor [b]is[/b] called, you just didn't define it. This: [code] obj() { cout<<"\n Is this constructor \n"; } [/code] is not a constructor. It's an ill-formed member function that happens to have the same name as your typedef. If your compiler doesn't warn …

Member Avatar for VatooVatoo
0
91
Member Avatar for theraven1982

>%02.3f The field width is the total number of printed characters, not the number of characters before the radix. Try "%06.3f" instead.

Member Avatar for theraven1982
1
761
Member Avatar for annagraphicart

There's absolutely no context to your question, and as such, it's nonsensical.

Member Avatar for Narue
0
349
Member Avatar for Herm

>I'm a hot woman from Holland, where are you.. You have 8 posts (presently) and most of them contain "I'm a hot woman". 1) Daniweb isn't a dating service. 2) It's creepy. 3) It makes you sound like a dude. 4) I feel my brain cells dying just reading your …

Member Avatar for Lardmeister
0
241
Member Avatar for rogelioz

The only part of the code you posted that the warning makes sense on is: [code] !isdigit(array[i]) [/code] And a cast can fix that, because isdigit expects an unsigned char value or EOF: [code] !isdigit ( (unsigned char)array[i] ); [/code] Post a more complete example that exhibits the problem, please.

Member Avatar for Narue
0
266
Member Avatar for Renjith VR

>So any way to adjust this terminal or anyway to keep the terminal size big? That's poor design. Your program's output should conform to the environment, not the other way around. There are ways to find out the size of the console, and you can use those rather than hard …

Member Avatar for Narue
0
148
Member Avatar for WEATHER CHANNEL
Member Avatar for Ashu@sym
Member Avatar for Duki

>So how would I access the Pizza data to output it? Probably define a member function or overloaded << operator that performs the output. In the code you posted, the Pizza class doesn't provide any way to get at the data. For example (keeping it simple): [code] class Pizza { …

Member Avatar for Duki
0
188
Member Avatar for TkTkorrovi

Are you still going on about being abused? Don't you have anything better to do than whine? Oh, and your thread is completely off-topic for this forum.

Member Avatar for Serunson
-1
180
Member Avatar for epigone

>im 15 years old, i wanna learn c++ >lol I'm reasonably sure that "lol" doesn't count as punctuation in English. Anyway, I look forward to your presence on the C++ forum (it's always nice to see new faces), though I encourage you not to take anything personally. You'll find people …

Member Avatar for jasimp
0
60
Member Avatar for cutepoison

We're not going to debug your program for you without any hints. If there's something wrong with it, tell us. Include any error messages you get and a detailed description of what you expect it to do. And read all of our announcements and rules before posting again, please.

Member Avatar for Narue
0
106

The End.