560 Posted Topics
Re: That would mean you should be searching for numbers that have nothing to do with -99, and when you want to quit the application -99 then becomes important. Your code looks like you are a C++ beginner, and I think you don't rest too much in a simple question, I … | |
Re: You have to call that function somewhere in the program. I'll leave it up to you to figure that one out. | |
Re: 1. Your success with multithreading is entirely up to you, imo you'll want to dedicate a bit of time to it because how can you expect to create applications that do non-trivial things with single-threaded applications? 2. Google try/catch in C++, chances are you just suck and this is a … | |
Re: lool, so what was the idea? You wrote a program and you don't know what it does? What exactly is done to the input to make the output? | |
Re: [QUOTE=ankurbangal;1597564][CODE]#include<stdio.h> #include<conio.h> #include<graphics.h> #include<dos.h> void main() { int gdriver=DETECT,gmode; initgraph(&gdriver,&gmode,"c:\\tc\\bgi"); int i=100,j=100,f1=1,f2=1,r=50,k; l: // printf("\n\nEnter the co-ordinate where from you want to start to move the circle : "); // scanf("%d%d",&i,&j); cleardevice(); // printf("\n\nEnter the redious : " ); // scanf("%d",&r); // if(r<i||r<j) {printf("\nWrong entry, Try again.");goto l;} cleardevice(); getch(); … | |
Re: Chances are we don't know what the problem is without seeing the code. | |
Re: No, he means another thread. C++ currently doesn't come with a platform independent way to spawn threads, so you'll have to either rely on Operating System API calls, or use a library (I recommend Boost). There are plenty of examples of both ways and I suggest reading some tutorials on … | |
Not sure where to post this, hopefully here. Basically if I make an application that does some stuff in the background, how does an antivirus know it isn't a trojan horse or something? Will my application be flagged as a virus, or is it generally safe to assume it won't … | |
Anyone know of a generic guide for using third party C++ libraries, specifically with Visual Studio 2010? I'm thinking "winging it" isn't cutting it, I want a resource to learn more about how these things are usually prepared, and used. I swear I saw a mention of a library system … | |
Re: You forget extern "C" ? Prevents name mangling if I remember right. try: [code] extern "C" DLL_EXPORT void *InterfaceFactory( char *pInterfaceName ); [/code] | |
The worst thing about C++ in my opinion is trying to use a library (with VS2010 at least). It always causes me great pain, and usually I am not met with success. So, I'm trying to use the Magick++ library, which is a part of the ImageMagick program, and I … | |
Ok so my parents bought a Nintendo Wii to use for Netflix, which is overall pretty sweet for me during the two more months I'll be living at home. So far I'm loving Netflix, but is there any way to pre-load movies instead of streaming them? I would like to … | |
Re: When I used it there were bugs, forgive me for expressing my opinion. I hate Dev-C++ actually, it was a piece of crap. | |
Re: I don't know anything about your plight. But, are you linking with a .lib or .dll ? | |
Re: Lol I hate to say it but Dev-C++ is a poor choice also, it's buggy and no longer supported as far as I know. Code::Blocks and Visual Studio express are the best IDEs for Windows, in my opinion. VS2010 express won't let you down I'm sure. As far as what … | |
So.. I want information on drawing on top of a DirectX game, like how Steam does it. I would consider naively trying to obtain a "device context" of the client area of the game's window, and then try some 2D drawing functions. D: I don't know if that's going to … | |
![]() | Re: If using VS2010... Remember, you can set the cursor on a variable, and in the right-click menu select Refactor->Encapsulate Field. Visual Studio 2010 does all the work for you :) |
Re: That is AWESOME! The product is only for C# ? I really wish native developers could use the refactoring and code completion tools managed developers get with VS2010. | |
Re: [QUOTE=gina_cs;1593730]Your reading must be wrong, because what you sent doesnt work[/QUOTE] Are you kidding me? Really? Did you check the file names? Why not try making the if condition this: [icode]if(in && out)[/icode] Oh and it would make your code look much more professional if you took better care of … | |
Re: @Narue, maybe it's just a poor choice of variable name? | |
Re: I might be in that boat in a couple months, lol. I just hope I can find an internship to tell the truth. What kind of work are you doing, is it interesting, and what programming languages do you get to use, etc? | |
Basically I have a database added to my project, and I need to know how to make a column map to another table. I have attached a couple of screenshots to show you what I mean, I want the "Absences" to be a new table, instead of a single DateTime. | |
Hello, I'm considering serialization as a means of creating a simple database for an application. I'm wondering if I'm going to run into any problems trying to serialize a list of a record-style struct comprised of simple data types, like strings and int, maybe a a DateTime or two. so.. … | |
Re: I don't know that I know the exact answer, but the class "class recursive_directory_iterator " has a member function " void no_push(bool value=true) " | |
Re: Not a chance. At least the VTOL is unmanned :) | |
Re: I like programs that support command line arguments. There, there's my opinion, now I'll just brace for the backlash..... | |
Re: Mostly people would say it's bad practice to use exceptions like you are, but for such a simple program it won't matter. | |
Re: Where did this tInches from from?? That doesn't rely on input from the user at all, so it begs the question, what is it doing?? Also, saying 67 inches is: and then using 43 inches in your calculations doesn't make any sense man!! | |
Well guys, I'm having a hard time learning enough about ANNs to apply them to a problem. Firstly my general understanding is that the network adapts during the "training" phase to produce the correct output with the given set of inputs. This is obviously useful with image recognition, or handwriting … | |
Re: line 7, forgot a : | |
Re: I also agree that it's too big where it doesn't matter. For instance, the bottom of the page has a lot of rarely used stuff and takes up a lot of space, I use the "end" key to take me to the bottom then I have to scroll up to … | |
Re: My guess is that there is an event that is raised every time the text changes, find that event and add the proper handler. In your handler I'm guessing you'll need to use the EventArgs (or similar) information to determine if the space was entered. Really, my guess is that … | |
Re: [quote][code]void main(void)[/code][/quote] void main is incorrect, use instead [icode]int main()[/icode] or [icode]int main(int argc, char *argv[])[/icode] For an explanation as to why void main is incorrect, please see the creator of C++'s FAQ. [url]http://www2.research.att.com/~bs/bs_faq2.html#void-main[/url] | |
![]() | |
Re: fmod(something) == 0 should be [icode]fmod(something) == 0.0[/icode] Otherwise a slight error might be because of limits of the representation of floating point numbers. | |
Re: Well... For that type of thing I would use a library. irrklang is free to use for non-commerical stuff: [url]http://www.ambiera.com/irrklang/[/url] I've used it a little, it's a pretty cool library. --edit-- I'm going to agree and say OpenAL is worth checking out. | |
Re: That page doesn't tell you everything you need to know either, but it is a good start. | |
Re: You'll want a C++ DLL to access the functions from C#. Unfortunately for you, it isn't really as easy as adding a reference to a C++ executable. For a guide to creating a DLL please consult google. | |
I'm sure many of you know how visual studio supports "outlining", it's where a block of code becomes collapsible and it can be expanded or collapsed by the plus sign on the left. Often times those seeking help feel it necessary to dump about 3-4 files into a thread and … ![]() | |
Re: If you're using Vista or W7 you may need to give your application administrator privileges to modify something in the root directory like that. | |
Re: It will probably work in C# if you take out the function and put it in a C# class. You REALLY need to look up some proper formatting guidelines, or use an IDE. | |
Re: You're using a tab, use "setw" setw sets a given number of spaces for the next item to be outputted. Here's a small example: [code] #include <iostream> #include <iomanip> #include <string> using namespace std; int main() { string firstColumn = "Name"; int secondColumn = 21; float thirdColumn = 3.58; cout … | |
Re: I don't think it's a plugin this guy installed it happens to me too, I'm using chrome. | |
Re: Personally I would rather not deal with "cin" failure, but rather a stringstream failure. I'm writing this in the textbox but it usually works when I do: [code] template<class int_type> int_type GetChosenNumber(std::istream &is, std::ostream &os){ int_type out; std::string in; std::getline(is, in); while( (std::stringstream(in) >> out).fail() ){ os << "Invalid input, … | |
Re: Calling the primary thread's invoke member executes the function on that thread instead of the new one. | |
Re: Maybe if the pointer to the base of the array is NULL, then it's not an array at all. But it could be, and it's definitely empty. | |
So.. I really don't know anything about modern databases at all. How can I learn to work with databases? Is it simple to create one? What should I do? | |
Re: That doesn't look very C++ish to me, specifically because you're using a C function. You can more than likely use a C++ std:;string, couldn't you? The c_str() member returns a const char *. [url]http://www.cplusplus.com/reference/algorithm/[/url] [url]http://www.cplusplus.com/reference/string/string/[/url] A C++ stringstream may fulfill your tokenization needs, [url]http://www.cplusplus.com/reference/iostream/stringstream/[/url] | |
Re: Such is also true to pointers. [icode] const char * constantData;[/icode] [icode] char * const constantPointer;[/icode] [icode] const char * const constantAll;[/icode] |
The End.