6,741 Posted Topics

Member Avatar for adamj2

>I think you're right on that one. It depends on what you mean by "char". If you're talking about the char data type, it's always equivalent to one byte in C++, for whatever the definition of a byte is. I think Vernon is assuming that a byte always equates to …

Member Avatar for adamj2
0
450
Member Avatar for casper_wang

>Is there any specific reasoning one would not recomend vb or >more specific to my needs Delphi using DelphiX to design games? Most of the questions are far too general to recommend anything but the most common and widely used languages. Due to their saturation of the field and the …

Member Avatar for casper_wang
0
124
Member Avatar for wcmport

>Would anyone be willing to see if you can tell me where my issue is. That's simple enough. Your issue is here: [code=cplusplus] int i, j; [/code] And it manifests here: [code=cplusplus] grid[i][j].row = i; grid[i][j].col = j; grid[i][j].frequency = 0; [/code] i and j aren't initialized. Unless you get …

Member Avatar for wcmport
0
110
Member Avatar for lAmoebal

>I'm curious as to how long it took people like Narue to >become as proficient as they are with the language. About 10 years in C++, about 12 years total.

Member Avatar for stephen84s
0
362
Member Avatar for Dani

I don't remember if you agreed to do it, but a full back history of reputation comments (as opposed to the most recent 15) in the user control panel would be fab.

Member Avatar for linux
0
113
Member Avatar for jainendra.shah

If it's an exact match, you can use the Contains method from the string class. If it's more of a fuzzy match, you can use regular expressions with the Regex class.

Member Avatar for jainendra.shah
0
65
Member Avatar for scream2ice

>does anyone know if there is a code in c++ that allows print on paper instead of monitor? Communicating with specific hardware is outside the bounds of standard C++. If you want a good answer, you need to tell us what compiler you're using and your operating system.

Member Avatar for Duoas
0
1K
Member Avatar for &rea

OffsetX is a read-only property, so all you can do is get the value: [code=cplusplus] x = my_matrix->OffsetX; [/code]

Member Avatar for &rea
0
55
Member Avatar for Thew

>Please, where I'm wrong? You're mixing up pointers to functions and pointers to member functions. A pointer to a member function (which is what you want) must be called on an existing object: [code=cplusplus] MTP::Application obj; (obj.*mExtVoid) ( true ); [/code]

Member Avatar for Narue
0
240
Member Avatar for arupa
Member Avatar for brnprasad630

>I wanted to know where will the selected message will be printed? It's a part of the preprocessor, therefore it's a compile-time operation. Logically, you can expect the message to be printed in the compiler's output. In Visual Studio that's the output window (Ctrl+Alt+O). >Can you give me a working …

Member Avatar for TheAgent1982
0
590
Member Avatar for QuantNeeds

>Temperatures degrees(); You stumbled on an annoying and subtle problem with C++'s declarations. What this does is declares a function called degrees that takes no parameters and returns an object of type Temperatures. Remove the parentheses: [code=cplusplus] Temperatures degrees; [/code]

Member Avatar for QuantNeeds
0
100
Member Avatar for callmeravi81

>What do you want to do? My crystal ball says he wants to pass his C++ class without learning anything or expending any effort.

Member Avatar for Jishnu
0
77
Member Avatar for ff4930

>What would be the syntax to insert say "hello" and say 3,3? [code=cplusplus] test.insert ( make_pair ( "hello", map<int, int>() ) ); test["hello"].insert ( make_pair ( 3, 3 ) ); [/code] Don't forget that you need to create a new map for the second half of the pair. >Also, how …

Member Avatar for Narue
0
121
Member Avatar for falloutphil

>I'd be eternally grateful if someone could explain this in detail or point me to a good link? [url=http://docs.sun.com/source/806-3568/ncg_goldberg.html]Here's a good link[/url], but the short answer is that due to floating-point imprecision, simply changing the order of arithmetic operations can affect the accuracy of the result.

Member Avatar for falloutphil
0
207
Member Avatar for Firestone

1) You have more control over who accesses your data and how they access it. For example, let's say you have a telephone number in the class represented by a string. If the variable is public, anyone can set it to anything. This means that your class can't assume the …

Member Avatar for Narue
0
81
Member Avatar for NiNTENDU

Every function parameter is passed by value in C. Pass by value means that a copy of the value is made and you access the copy from within the function. For example: [code=c] #include <stdio.h> void foo ( int bar ) { printf ( "%p\n", (void*)&bar ); } int main …

Member Avatar for NiNTENDU
0
800
Member Avatar for Muttley

1) This looks like a perfect place to run a simple test on your own: [code=cplusplus] #include <iostream> class Base { public: ~Base() { std::cout<<"Base\n"; } }; class Derived: public Base { public: ~Derived() { std::cout<<"Derived\n"; } }; int main() { Derived d; } [/code] 2) Sure, if you want …

Member Avatar for Narue
0
125
Member Avatar for Alex Edwards

>Why is it that I cannot call th method in RTC::displayParameters() with >the template-argument mStruct* when it is clearly a constant reference? Because it clearly isn't. Let's start with the fact that <mStruct*> is a syntax error. The closest interpretation would be to call the instantiation of displayParameters using a …

Member Avatar for vijayan121
0
129
Member Avatar for salman213

>How is that occurring, by adding an extra dimension to array it takes both words. It helps to know that the native string type in C++ is actually an array of char, and cin's >> operator is pretty smart about knowing what types you give it. When array[i] is an …

Member Avatar for salman213
0
149
Member Avatar for xtr.eme

>you didn't hint on an answer to my original question. It involves creating your own graphics and piecing them together manually. I'm not familiar with Qt, but it might give you the option of skinning your interface, which simplifies the piecing together part.

Member Avatar for Kob0724
0
87
Member Avatar for salman213

>but can u just make the >int x and int y public instead? You can, but public data is typically a bad idea because it means you're giving full control over the values to everyone. Most of the time you don't want to do that, which is why public or …

Member Avatar for salman213
0
146
Member Avatar for Shaun32887

If you just want to use hash tables then the TR1 libraries are sufficient (assuming you have them). If you want to learn how hash tables work, then a good start would be [url=http://eternallyconfuzzled.com/tuts/datastructures/jsw_tut_hashtable.aspx]this tutorial[/url].

Member Avatar for Shaun32887
0
152
Member Avatar for salman213

>What are the PRACTICAL APPLICATIONS of C++ and even C for that matter. Literally anything. Pick a program and it was probably written in some combination of C and C++, or written with a language that was implemented using C or C++.

Member Avatar for Narue
0
576
Member Avatar for Swin

I looked at your thread. Unless it completely breaks a rule (ie. no value whatsoever), we don't delete threads that have replies because it's unfair to those who have replied. > I want to change my user name from "himajaasp" to "SRPH". For that a PM to either cscgal or …

Member Avatar for grvs
0
181
Member Avatar for amygoel

>Inheritance cannot be used for what in C++ Not enough detail, try again.

Member Avatar for Pikachumanson
0
86
Member Avatar for sittas87

>Hey the Dude youre a maven here The Dude is certainly a maven when it comes to posting arbitrary links in the Geeks' Lounge to entertain us. Beyond that, I'm not so sure. Let's see: >1. what happened The Vista 32-bit display driver for my very expensive graphics card borked …

Member Avatar for ~s.o.s~
0
124
Member Avatar for rharvison

Instead of putting all of that framework around your loop, first get a simple loop working so that you know what's needed: [code] #include <iomanip> #include <iostream> using namespace std; void table_row ( int multiplier ) { for ( int i = 1; i <= 12; i++ ) cout<< setw …

Member Avatar for Alex Edwards
0
155
Member Avatar for phalaris_trip

I don't see the benefit of goto here. If your code is properly modularized, displaying the mission menu amounts to a single function call, so jumping around with goto doesn't really buy you anything. I'd conclude that you should refactor before considering a solution with goto.

Member Avatar for Duoas
0
274
Member Avatar for Ene Uran

IIRC, Dani doesn't allow popups, or flyins, or anything obtrusive in her agreements with advertisers. I'd suggest sending her a screenshot when you get it again, because the advertiser may be in breach of contract.

Member Avatar for Dani
0
160
Member Avatar for majestic0110

The most irritating bug I've encountered is mixing up << and >> in C++ iostream operations. It's irritating because I do it all too often and I know better. >the longest to fix Probably intermittent data corruption in a very complicated parser. It took me forever to find the source …

Member Avatar for twomers
0
137
Member Avatar for ddimon

>...And of course he has waited to the last minute so he needs it asap Well, that's his problem, not ours. Note that these answers assume that by "game developer", you mean a programmer rather than a graphic designer or one of the many other roles involved in creating a …

Member Avatar for ddimon
0
147
Member Avatar for teh noobshow

>a bot isn't necessarily bad. I beg to differ. In MMOs bots encourage farming and can severely damage the game economy and balance. >IMNSHO, there's no such thing as 'cheating' in a computer game. Once again taking my experience from MMOs, bots are almost always in violation of the EULA …

Member Avatar for MattEvans
0
472
Member Avatar for Drake

>can anyone tell me if global variables are not liked Experienced programmers tend to cringe when they see global variables. >and why Global variables are almost always an indication of poor design. They're such a small and innocent seeming thing, but the repercussions can be truly frightening if you know …

Member Avatar for jephthah
0
189
Member Avatar for venkatsvsr

>If i follow these i am almost a programmer? You can't break down the practice of programming into a to-do list. >if u know anything else please express here Learn enough of a programming language to write a working program. Congratulations, you're a programmer!

Member Avatar for Narue
0
111
Member Avatar for seeker55

>I slacked off in class while my teacher was teaching us At least you're honest. That won't stop most of us from letting you sit in the hole you dug for yourself, but it's a breath of fresh air nonetheless.

Member Avatar for seeker55
0
98
Member Avatar for dalaharp

>Well partner, it's a start! If by start you mean poor quality code that doesn't address the problem at all, yes.

Member Avatar for jephthah
0
3K
Member Avatar for Black Magic

Put another loop inside that loop. You want to print (digit+1) asterisks and then a newline.

Member Avatar for William Hemsworth
0
101
Member Avatar for daviddoria

"Much better" is debatable, but you can make use of the constructor that takes an iterator range: [code=cplusplus] vector<double> V1(Model.begin() + StartModel, Model.begin() + EndModel); [/code]

Member Avatar for Narue
0
148
Member Avatar for maafipau

[Note: It's extremely rude to post a message and then edit it into nothing. I've kept my reply the same as if you hadn't removed post #5's previous content] >it s that i hav made some code If you ask for generic help without posting code, everyone will assume you …

Member Avatar for Narue
0
385
Member Avatar for daviddoria

>Is the solution simply to accept it as a char* instead of a const char*? Hardly. It's better to understand the error and correct your logic rather than bumble your way through a workaround that will end up mysteriously crashing your program. >I thought it was always better to have …

Member Avatar for Narue
0
106
Member Avatar for joma4real

>Thanks but this one doesn't work salem "doesn't work" doesn't compute: ambiguous statement detected.

Member Avatar for Narue
0
57
Member Avatar for buddy1

What have you tried so far? This is actually a simple enough project because you can easily figure out the steps on paper and then translate those steps directly to C++. So your first order of business should be to work out the exact steps of adding a binary number …

Member Avatar for buddy1
0
265
Member Avatar for VernonDozier

You need to add the appropriate DLL as a reference. You can do that from the UI by right clicking on your project and choosing "References". From there you can add a new reference for .NET. Alternatively you can reference the DLL directly from your code with a #using statement: …

Member Avatar for VernonDozier
1
3K
Member Avatar for siripong153

>How can i do it in C? File handling examples for C are all over the place, but I'm guessing you didn't bother to search this forum. Here's yet another example: [code=c] #include <stdio.h> int main ( void ) { FILE *out = fopen ( "filename", "w" ); if ( …

Member Avatar for jephthah
0
152
Member Avatar for C-+
Member Avatar for n1337
0
140
Member Avatar for techbrain55

>Is this course worth a try? If anything, you'll learn about Visual Studio, Maya, and 3DS Max. >And is DarkBasic useful in the game industry? I'm not privy to the workings of the game industry, but from my consulting experience, I'd say that DarkBasic is more of a kiddie program …

Member Avatar for patelmiteshb
0
195
Member Avatar for Brent.tc

>1) a link to rules. It's on every page, just below the breadcrumbs and page header along with the FAQ (which people also tend not to read) and the welcome guide. >2) the name of a good moderator/other person who >could give general help via private message If you have …

Member Avatar for Nick Evan
0
226
Member Avatar for gogoc
Member Avatar for BethL

>If you were to agree to these terms, how would you expect >the company to behave with regard to your material? Given nothing other than your paraphrasing, I'd expect them to do anything they please [I]except[/I] claim ownership of the material. >Would you be angry if the company didn't get …

Member Avatar for jwenting
0
121

The End.