6,741 Posted Topics

Member Avatar for kpillsb39

That's about the coolest formatting I've seen in a post to date. :D

Member Avatar for Narue
0
84
Member Avatar for hightechgirl7

Posting your homework isn't going to get you help. You need to specify what you don't understand, and if you want help with a solution, post what you've already tried so we don't assume you're mooching off of us.

Member Avatar for hightechgirl7
0
137
Member Avatar for Fasola

You silly goof, write an interpreter and then run the code to see what happens. I guarantee that you'll get the job. :)

Member Avatar for Narue
0
125
Member Avatar for tformed

>why don't you better use cin and cout? Agreed. Perhaps this thread is in the wrong forum and he's really using C. >either way, it would be like this: scanf("%s",&word); No, it wouldn't. There are two glaring problems with that code: 1) Never ever ever use %s. It's no better …

Member Avatar for tformed
0
135
Member Avatar for bklstheman

>Now I know I can easily put a getchar() but I know there is a better way. If you know there's a better way, why are you asking? >So if anyone has any tips I that would be grateful. The problem is that the IDE creates a console process for …

Member Avatar for iamthwee
0
122
Member Avatar for jlb_2_99

>dude please study c well before u start writing code u have used an if 4 >times wht if after 4th time money is still less use a dowhile loop Wow, do you even know what punctuation is? We recommend that you use proper English. There's no reason to use …

Member Avatar for Chaster
0
141
Member Avatar for kinggarden

>So it would so nice of you to give me some advice on my codes Granted, all I did was skim over it, but your use of the standard library and exceptions looks okay. >Why does that coder write that complicated codes? Well, it looks like you're using Visual Studio, …

Member Avatar for Narue
0
207
Member Avatar for meiyantao

>I encounterred a person who said that C++ is an unsafe language. It is and it isn't. C++ doesn't do much to protect you from doing something wrong, so in that light it's an unsafe language. However, if you do things right, it's perfectly safe. I'd say that person was …

Member Avatar for Narue
0
251
Member Avatar for senior_mustafa

>AFAIK these are the famous/unbeatable/the-best books on this topic They're by far the highest quality I've seen, and very thorough if you can handle the abundant higher math and the custom assembly language. However, TAOCP is showing its age these days, and a lot of the algorithms invented after it …

Member Avatar for Narue
0
82
Member Avatar for Narue

Normally I'm an avid Everquest II player, but I decided to try this out based on the good reviews. And it's awesome! I can't get over the visual effects and how beautiful the game looks without bogging down my high-end machine (ala Vanguard). The world feels big and looks great. …

Member Avatar for joshSCH
0
347
Member Avatar for jenymaru08

>how i will find the last character?? strlen gives you the length of the string. If you use that number as an index into the string, it always gives you the null character. Provided that number isn't 0, you can subtract 1 and it'll give you the last character in …

Member Avatar for hinduengg
0
99
Member Avatar for stanats

Read it forward, store it in a reversible container, and then walk through the container backward. Or if you know the exact length of each line, you could open the file as binary and use fseek with read to get the lines in reverse. Or you could physically reverse the …

Member Avatar for echobase
0
2K
Member Avatar for tunday

That sounds like the kind of situation where you would raise an event and pass the data as an argument to the event.

Member Avatar for tunday
0
182
Member Avatar for quintoncoert

>but I have to write a program which controls certain hardware and the dll for it cannot work in 2005. That's different. If you're forced to use a tool by some outside force, you don't have a choice. So in this case it's worth it to learn VC++ 6 because …

Member Avatar for quintoncoert
0
113
Member Avatar for Matt Tacular

Unexpected characters means you're probably accessing an array out of bounds. When running the program, print out the indexes whenever you access an array for printing. If the index isn't what you expected, that's the symptom of the bug and you can trace it back to where the index got …

Member Avatar for Matt Tacular
0
171
Member Avatar for mark_neil2

>I am wondering if some expert in C++ at this forum can do this for me. No. We help you do your work, we don't do it for you. Please read the rules before posting.

Member Avatar for iamthwee
0
116
Member Avatar for Matt Tacular

>I was thinking maybe an array of arrays You were thinking correctly. Something like this perhaps? [code] #include <iostream> #include <ios> #include <limits> int main() { int a[][5] = { {1,2,3,4,5}, {5,4,3,2,1}, }; int index; std::cout<<"Enter 1 for ascending or 2 for descending: "; while ( !( std::cin>> index ) …

Member Avatar for Narue
0
86
Member Avatar for dcc

>Have you ever wondered if you fit the description of a cool guy or a dork? I'd have to say no since my measurement of being a dork includes relying on external links to add value to otherwise worthless posts. As you may have guessed, a lot of Geek's Lounge …

Member Avatar for maravich12
0
68
Member Avatar for richie2021

>one of the warnings is, incompatible implicit declaration of built-in function strcpy. You need to include <string.h>. This compiles, and I fixed a few obvious logic errors (like the first call to strtok needing the string you want to tokenize instead of NULL): [code] #include <stdio.h> #include <stdlib.h> #include <string.h> …

Member Avatar for richie2021
0
127
Member Avatar for bops

>hey, how would i go about converting a char* character array to a double. Provided the array is actually a string with a terminating '\0' character at the end, you can use strtod. Or, since this is C++, stringstreams make the conversion intuitive if you're used to cin and cout: …

Member Avatar for Narue
0
236
Member Avatar for Tauren

>if you can find any for me tell me please ty Is it that hard to go to amazon.com or your local bookstore and look? I mean, you look pretty lazy judging by that request.

Member Avatar for ongxizhe
0
304
Member Avatar for ongxizhe

>Firstly, I would lke to know is C++ GUI the same as C++.NET or there isn't such thing as C++.NET? It's the other way around. There isn't such a thing as C++ GUI. There are a number of libraries that let you create a GUI using C++, but that's different …

Member Avatar for ongxizhe
0
161
Member Avatar for ongxizhe

Handle the click event for both buttons and in the event handler call the BringToFront method of the form you want to go to. I don't know your form setup, so I can't offer any more advice than that.

Member Avatar for ongxizhe
0
249
Member Avatar for Matt Tacular

Why in the world do you need those unsigned int variables to initialize the array? You can just do this and get the same effect: [code] int countryPopulationArray[20] = {0}; [/code]

Member Avatar for ~s.o.s~
0
86
Member Avatar for nalinibh

>Can i cache a result somewhere in C! Yes, you can do just about anything in C. >Should i use an if statement? I'm sure you would need one somewhere. :icon_rolleyes: >so i want to cache an intermediate result whenever the same data is used. So what's the problem?

Member Avatar for nalinibh
0
112
Member Avatar for Elfshadow

>Is this the right way to use fgets when its for non file input. No, you forgot to check the return value, and you need to flush stdout before calling fgets when the prompt doesn't have a newline. This is mostly correct: [code] #include<stdio.h> int main ( void ) { …

Member Avatar for WaltP
0
112
Member Avatar for meiyantao

How would that make things more readable? B is only accessible to A, so the only place you can create the typedef is inside A, and the only place you need to qualify it with A:: is in an out of line definition. If you typedef B as C, you …

Member Avatar for meiyantao
0
181
Member Avatar for Matt Tacular

>list<humanPlayer> jailHouse; jailHouse is a list, the list class doesn't allow random access with the subscript operator. >if(find(countriesOwned.begin(), countriesOwned.end(), countryToCheck) != countriesOwned.end()) I'm guessing this is giving you problems too. ;)

Member Avatar for Matt Tacular
0
131
Member Avatar for meiyantao

I'm most certainly not a fan of Weiss' code, but the book you have is half decent in terms of coverage. His stuff is noticeably dumbed down, but if you want to take your trees to the next level, try [url=http://eternallyconfuzzled.com/tuts/datastructures/jsw_tut_bst1.aspx]this[/url].

Member Avatar for WolfPack
0
174
Member Avatar for jbennet

>just for fun lets look at these fourteen characteristics of fascism: Interesting. And where did you get them? :)

Member Avatar for jbennet
0
635
Member Avatar for christina>you

>Without these certifications, what good are you then? Just as good as you are without them. >No employer is going to hire you just because you say you have "good >experience" backed up with no certifications. I like to think that I have a bit of experience with this (having …

Member Avatar for christina>you
0
806
Member Avatar for alex130
Member Avatar for uglinho
0
5K
Member Avatar for blueskylvr7

>AD? You're probably being confused for Ancient Dragon. I bet that makes you feel good. ;)

Member Avatar for thekashyap
0
97
Member Avatar for radskate360

>I have been working on this school project and have figured out every step but two. > >So far I have everything done, and my stumbles are on #4 > >Also on #6 I can add the explanation point to the end of the words that >are longer that 8 …

Member Avatar for radskate360
0
117
Member Avatar for blazted

Your bracing and indirection are off. To get the address of the links, you need to first dereference current_node. Then you need to do a member access using the arrow operator to get the link, then you need to take the address of that result: [code] &( *current_node )->left [/code] …

Member Avatar for blazted
0
132
Member Avatar for Matt Tacular

>How can I access the array of classes from other functions? Well, if you want global but not global, a Singleton with the array as a member would be plausible. Or you could pass the array around, or you could create a wrapper for the array and pass it around. …

Member Avatar for Narue
0
124
Member Avatar for kinggarden

>And it's a question for beginner, maybe I should use some beginner's way. Maybe you should read the question more carefully. ;) The problem asks you to calculate a factorial (that is, N!), not the factors of a given number. You're trying to solve the wrong problem. >Storing the data …

Member Avatar for Narue
0
121
Member Avatar for Micko

You're mixing up the meaning of a row and a column. The following allocates using column major order (a[cols][rows]): [code] mat1 = malloc(cols * sizeof(int*)); for(i = 0; i < cols; i++) { mat1[i] = malloc(rows * sizeof(int)); } [/code] And this prints using row major order (a[rows][cols]): [code] for …

Member Avatar for Micko
0
155
Member Avatar for Matt Tacular

Is this a console program? That kind of thing is better suited to windowed programs, but you can do it easily if you want: [code] #include <iostream> #include <iomanip> #include <climits> #include <windows.h> int main() { int count = 0; for ( ; ; ) { if ( GetAsyncKeyState ( …

Member Avatar for Opo
0
150
Member Avatar for meiyantao

>I am sorry for that I can't understand what's this sentence's meaning? Where did you find that sentence? It's nowhere in this thread. >Can you tell me what is your opinion in whether use "NULL" in C++? 0 and NULL are the same thing in C++. Pick one and use …

Member Avatar for Narue
0
148
Member Avatar for Matt Tacular

>"Matt" This is a string. >char thePlayersName This is not a string. Since you don't seem to understand the difference between a char and a pointer to char, you should stick to using std::string objects.

Member Avatar for Narue
0
116
Member Avatar for alexxxprog

Have you tried to do it on your own? Or did you just run here hoping that someone would do your homework for you?

Member Avatar for alexxxprog
0
211
Member Avatar for Eko

I don't think anyone is dumb enough to write a book like that. Your best bet is simply to know the language well enough to figure out the problems. Or tell your teacher to learn the language well enough not to accidentally introduce errors so that the problems are easier. …

Member Avatar for Narue
0
130
Member Avatar for yilmazhuseyin

You derive Operators from BaseToken, but tokenValue is a member of Operators, not BaseToken. So BaseToken can't use it because inheritance goes down the chain, not up it.

Member Avatar for yilmazhuseyin
0
127
Member Avatar for mike.mclennan

>So there is my challenge: convince me. Okay. You can run Windows as a virtual machine while running Mac OS at the same time. With the incredible memory magic of Mac OS, you can run both simultaneously without any noticeable performance penalty. Congratulations, you now have the best of both …

Member Avatar for joshSCH
0
427
Member Avatar for sundar divas

Do you need any implementation, or something specific? We're not going to just give you code for something that sounds like homework. And if I link you to a priority queue that uses a straight array but you really needed one that uses a heap, we've accomplished nothing. So can …

Member Avatar for Narue
0
107
Member Avatar for Junyah

Not that I care or anything, but what kind of illness keeps you from posting on Daniweb?

Member Avatar for Narue
2
123
Member Avatar for castegna

[url]http://eternallyconfuzzled.com/tuts/datastructures/jsw_tut_bst1.aspx#traverse[/url]

Member Avatar for Narue
0
127
Member Avatar for complete

>effectively don't they do the same thing? Somewhat. The define is a textual replacement. Anywhere you say X, it's turned into 100 before the code is compiled. Y, on the other hand, is an actual object that the compiler will recognize. You should choose the latter simply because there's fewer …

Member Avatar for vijayan121
0
121
Member Avatar for machine
Member Avatar for machine
0
250

The End.