6,741 Posted Topics

Member Avatar for Laik

>He can write a kernel, but programming a Graphical Interface is too difficult ... Two completely different things. Though the way the question is worded makes me think of a l33t h4x0r script kiddie with no clue at all about how complex an operating system is.

Member Avatar for adam1122
0
126
Member Avatar for Turyturbo

>void main() int main() >if((StringPtr = new char[26]) == NULL) This may or may not correctly handle errors depending on how old your compiler is. >*(StringPtr+i) = String[i]; You know, you can do [INLINECODE]StringPtr[i] = String[i];[/INLINECODE] too. It's a lot easier to read and write. >cout << "StringPtr = " …

Member Avatar for ThundrbltMN
0
244
Member Avatar for shasha821110

>What does that mean?? erase modifies the string, but your string is const. Well, that's not what the error means, but it's the root cause. ;)

Member Avatar for Narue
0
78
Member Avatar for shasha821110

The translation of your error is that std::map doesn't support random access iterators, and random access iterators are required for std::sort to work. However, std::map is already sorted on the key, so there's no need to explicitly sort anyway.

Member Avatar for Narue
0
147
Member Avatar for kelechi96

>What are and how do I use vectors ? Vectors and arrays are conceptually analogous. Due to operator overloading, you can use a vector in much the same way you use an array, with the added convenience of built-in functionality like automatic growth and useful information rolled up into a …

Member Avatar for Narue
0
116
Member Avatar for Alibeg

>how do i typedef a structure The method I usually see is a compact one: [code=c] typedef struct foo { /* ... */ } foo; [/code] But you can do it your way as well (though note you have a spelling error in the typedef; it's MyStructure, not MyStucture ;)). …

Member Avatar for Alibeg
0
308
Member Avatar for ~s.o.s~

Hmm, this spring doesn't seem very interesting anime-wise. The only one I'm truly looking forward to is Corda d'Oro, but that appears to be more of an epilogue than the second season that fans really want. >Dragonball Kai Dragonball Z without all of the time-wasters? Who wants to bet that …

Member Avatar for Narue
2
322
Member Avatar for deppsgirl
Member Avatar for tux4life
0
170
Member Avatar for Samuelandjw

>Could anybody tell me what happen? You don't know how to properly declare an array in C++: [code=cplusplus] int main() { int maze_size=5; int oppo_pos[3][2] = { {maze_size-1,maze_size-1}, {maze_size-1,0}, {0,maze_size-1} }; return 0; } [/code]

Member Avatar for Sky Diploma
0
124
Member Avatar for TheBeast32

>It's really freaking complicated Well, duh! ;) It's not as complicated as some people (who haven't learned it and base their opinions on anecdotes) would have you believe, but programming is hard, and assembly is programming without any sugar coating[1]. >so do any of you know of any good tutorials …

Member Avatar for Narue
0
197
Member Avatar for davidjohnson

If this [I]isn't[/I] one of those obvious paired spam questions (one account asks an "innocent" question and another answers it with an advertisement), it'll attract spammers anyway. /thread

Member Avatar for Ancient Dragon
-1
97
Member Avatar for guest7

>Try converting the value using static_cast<int>(yourvalue) ... Casting is the worst possible reaction to an error like this. Putting a dirty plate in a stack of clean plates doesn't make it clean.

Member Avatar for tux4life
0
66
Member Avatar for Crago3

This thread is being closed due to violation of Daniweb's homework policy. Read our rules, try it yourself, and then create a new thread if you need help (help != handouts, by the way).

Member Avatar for Narue
0
459
Member Avatar for Narue

[url]http://www.daniweb.com/forums/thread184342.html[/url] It seems AD is seeing something similar to me, but that thread is horribly messed up. I'm viewing it with Firefox 3.0.8 and words can't really describe the jumble of images and formatting that's all wrong.

Member Avatar for WaltP
0
349
Member Avatar for MaestroRage

>It seems he's declared... a pointer that is also a function? Nope, it's a function that returns a pointer. The closest thing to a pointer that's also a function would be a pointer to a function: [code=c] void (*fp) ( void ); [/code]

Member Avatar for ArkM
0
95
Member Avatar for jephthah

>so who should I believe? which team should i join? You should get all of the facts and form your own unbiased opinion. Mindlessly following one group or another is silly.

Member Avatar for Narue
0
67
Member Avatar for senaddor

I haven't received enough feedback to confidently say if [URL="http://www.eternallyconfuzzled.com/tuts/datastructures/jsw_tut_linklist.aspx"]this[/URL] is a good enough and detailed enough article, but I'll suggest it anyway.

Member Avatar for Narue
0
111
Member Avatar for seriousgeek

Start by looking at the code for an open source browser. If you want to write it from scratch, you've got your work cut out for you.

Member Avatar for Upsilon
0
89
Member Avatar for dollycharm

>can you help me with xml coding with that attached file? XML is a hierarchical data modeling language. The image you gave shows nested data in the blocks to the right, so this: [code] +-----------------+ | | | baz | | | bar +-----+ | | | baz | | …

Member Avatar for xml_looser
0
110
Member Avatar for danishamman
Member Avatar for Narue
0
2K
Member Avatar for senaddor

> tree_node* root; //???Is this creating pointer root to first node???? Yes, it's the root of the whole tree. >root = NULL; //???start with empty binary search tree???? Correct, though an empty tree doesn't have to be just a null pointer. Often[1], you'll see trees with a dummy root for …

Member Avatar for tux4life
0
138
Member Avatar for pdrino

Let's start by clearing up an obvious misunderstanding about pointers. >char *str; >fscanf(inp, "%s", str); This is broken. An uninitialized pointer does not mean a pointer to unlimited space. It means you're not allowed to dereference that pointer or compare it to anything until you initialize it. You still need …

Member Avatar for Aia
1
2K
Member Avatar for senaddor

>I don't understand how it's done. The best way to understand recursion is to walk through a small example manually. Follow your code step by step with a pencil and paper, working on the logical tree you've already provided: [code] 6 / \ 4 7 [/code] [code] root = 6, …

Member Avatar for Narue
0
178
Member Avatar for rahul8590
Member Avatar for rahul8590
0
122
Member Avatar for Narue

## Before You Ask ## - Read our [Forum Rules](http://www.daniweb.com/community/rules). - Engage your brain! We understand that running into a problem can turn off the rational centers of the brain, but please sit back and think for a bit about your problem before running off to find help. All too …

Member Avatar for Ancient Dragon
23
7K
Member Avatar for Ancient Dragon

I think it's rather arrogant to believe that global warming is mostly our fault (or that we can "fix" it) when there's evidence of several extreme planet-wide climate changes in both directions long before humans were around. I saw the snowball Earth theory on TV as well quite a while …

Member Avatar for chriswellings
0
139
Member Avatar for pscha3

Read [url=http://www.daniweb.com/techtalkforums/misc.php?do=bbcode#code]this[/url], please.

Member Avatar for adam1122
0
391
Member Avatar for free radical

>but what's so wrong about it? Destructors aren't called when you use exit. It's not a C++ friendly function.

Member Avatar for free radical
0
191
Member Avatar for Dave Sinkula

>If people's choices are hurting others then yea, it is our >business, and we can tell them how to live their lives >When it endangers other lives. Of course! And naturally you're qualified to make that choice. :icon_rolleyes: Tell me, have you ever thought to ask a smoker not to …

Member Avatar for jbennet
0
4K
Member Avatar for drjay1627

I've neither written nor worked with such software, but I imagine it works something like a spam blocker by looking for fuzzy patterns or by comparing patterns from trusted code. I'd personally trust my eye more than plagiarism software. When you've been reading code for long enough, you can easily …

Member Avatar for tux4life
0
104
Member Avatar for theories

>would it be an acceptable practice to make a header with all of the >variables that will be used in many methods defined as extern You're substituting one problem for another. In this case, the inconvenience of passing data around versus the nightmare of global variables in all but the …

Member Avatar for ArkM
0
87
Member Avatar for Lukezzz

CancelAsync should work as long as your worker checks the CancellationPending property on a regular basis.

Member Avatar for Lukezzz
0
139
Member Avatar for drjay1627

push and pop are std::queue's equivalent of enqueue and dequeue, respectively.

Member Avatar for drjay1627
0
69
Member Avatar for daviddoria

Have you looked into the standard library? There's a std::unique and std::unique_copy function.

Member Avatar for daviddoria
0
213
Member Avatar for bluebird

>I don’t know how to add + operator. Liar. Aside from not terminating the DistSign class (which I assume is simply a copy/paste error), your overloaded operator works just peachy. It can't be used as an rvalue because it returns void, but that's a design decision, not an "I don't …

Member Avatar for MrSpigot
0
87
Member Avatar for bluebird

>Can somebody help me? I don't know what you've covered so far in your class, but I would use a template for this kind of variance in return type.

Member Avatar for Narue
0
164
Member Avatar for bluebird

>why it does not show the title for tape. It does, but the title happens to be an empty string. You're suffering from the problem described in the first paragraph of [URL="http://www.daniweb.com/forums/thread90228.html"]this sticky[/URL]. >what is the meaning of 1000 in that function? The first argument is a maximum limit, it …

Member Avatar for Narue
0
347
Member Avatar for ARYT

>How do we determine the value of n? If you can't use dynamic memory (and I'm assuming any alternative that uses dynamic memory, like std::vector), your only option is to make the array large enough to handle any reasonable number of records: [code=cplusplus] int P[1000], T[1000], V[1000]; [/code] Of course, …

Member Avatar for Ancient Dragon
0
219
Member Avatar for SUD

>How you can use cin.ignore to ignore every character >up to and including a specified character I'd start by reading my reference manual and seeing that the second argument to ignore is a delimiter. >I have written a program but it does not work the way I would like to? …

Member Avatar for William Hemsworth
0
866
Member Avatar for erialclaire_238

Since this is extremely likely to be yet another attempt at starting a new thread with the same question, I know exactly what it is you want. But I'm still going to make you explain your question.

Member Avatar for erialclaire_238
0
75
Member Avatar for erialclaire_238

You're not handling the default cause of a non-code. Since the first letter is 'm', and there's no substitution for 'm', your output is correct.

Member Avatar for erialclaire_238
0
207
Member Avatar for kodypruitt

It's never too late to start, but the game industry is incredibly competitive, so four to six years might be unrealistic for the dream job, depending on what exactly you want to do. However, getting into the industry is certainly doable. >Also, just wondering how hard the math really is? …

Member Avatar for MJ Pieterse
0
123
Member Avatar for fif3l

>it fascinates me that more people dont use it! I can't imagine why. Pretty much the entire reason Linux exists at all is political infighting among the alternative vendors at the time. Why is it so surprising that vendors with an existing foothold aren't budging much when Linux comes around? …

Member Avatar for xkey
0
140
Member Avatar for FREEZX
Member Avatar for wzseow

>int sort(double top, double middle, double bottom); >{ Notice the semicolon before the opening brace in your function definition. You need to remove it. >double top, middle, bottom, temp; top, middle, and bottom are function parameters, you shouldn't redefine them as local variables. Compare: [code=cplusplus] int sort ( double top, …

Member Avatar for wzseow
0
116
Member Avatar for usman2k4u
Member Avatar for daviddoria

It's a feature of C++/CLI, so yes, it's pretty much restricted to Visual Studio.

Member Avatar for Narue
0
92
Member Avatar for ARYT

You'll need to read the chapter on classes and objects again. You clearly didn't understand it sufficiently to write any code. Once you figure out the relationship between objects and members, you'll be able to clear up the majority of those errors.

Member Avatar for monkey_king
0
221
Member Avatar for Takafoo

>int i, count; You're not initializing count to 0, so when you increment, it starts at whatever garbage value was already in memory.

Member Avatar for Narue
0
146
Member Avatar for Alibeg

A two dimensional array is not the same type as a pointer to a pointer. If you want to pass a two dimensional array, change your function to accept the correct type. If you want to pass a pointer to a pointer then pass the correct type. So what is …

Member Avatar for Narue
0
226

The End.