6,741 Posted Topics
Re: >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 … | |
Re: >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 … | |
Re: >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 … | |
Re: >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. | |
Re: 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. | |
Re: 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. | |
Re: >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. | |
Re: OffsetX is a read-only property, so all you can do is get the value: [code=cplusplus] x = my_matrix->OffsetX; [/code] | |
![]() | Re: >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] |
Re: >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 … | |
Re: >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] | |
Re: >What do you want to do? My crystal ball says he wants to pass his C++ class without learning anything or expending any effort. | |
Re: >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 … | |
Re: >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. | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: >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 … | |
Re: >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 … | |
Re: >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. | |
Re: >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 … | |
Re: 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]. | |
Re: >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++. | |
Re: 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 … | |
Re: >Inheritance cannot be used for what in C++ Not enough detail, try again. | |
Re: >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 … | |
Re: 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 … | |
Re: 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. | |
Re: 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. | |
Re: 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 … | |
Re: >...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 … | |
Re: >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 … | |
Re: >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 … | |
Re: >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! | |
Re: >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. | |
Re: >Well partner, it's a start! If by start you mean poor quality code that doesn't address the problem at all, yes. | |
Re: Put another loop inside that loop. You want to print (digit+1) asterisks and then a newline. | |
Re: "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] | |
Re: [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 … | |
Re: >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 … | |
Re: >Thanks but this one doesn't work salem "doesn't work" doesn't compute: ambiguous statement detected. | |
Re: 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 … | |
Re: 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: … | |
Re: >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 ( … | |
Re: More code please. Preferably a full test program that exhibits the problem. | |
Re: >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 … | |
Re: >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 … | |
Re: >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 … |
The End.