- Strength to Increase Rep
- +2
- Strength to Decrease Rep
- -0
- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Re: mmm, if the whole point is avoiding accidental changes to Bla's date field then you could use const_cast. [url]http://www.cppreference.com/wiki/keywords/const_cast[/url] [CODE] char* ReturnDate(Bla const& blabla) { //strcpy_s(blabla.date,8,"assssde"); <- This would give you a compiler error. return const_cast<char*> (blabla.date); }[/CODE] Don't just trust me. Do some research. It's been some time since … | |
Re: Isn't it created when you [B]compile[/B], your program, saad749? I don't use that compiler but there should be a specific directory (maybe debug or release) where your .exe is being produced on compilation. You can execute that file just like any other executable. | |
Re: You need to make an array of students and loop through the elements of that array. Some links about c++ arrays for reference: [url]http://www.cplusplus.com/doc/tutorial/arrays/[/url] [url]http://www.learncpp.com/cpp-tutorial/61-arrays-part-i/[/url] | |
Re: I'll start by saying I've used blender but I've never used the Game Engine. Are you trying to export information from a c++ application to be able to read it later from the Blender Game Engine or you're talking about using c++ to manage the it? If it's the latter, … | |
Re: You can't manually clear the memory of static arrays. The memory of that array won't be cleared until you leave the scope where it was declared (scope is, in this case, the space within the curly braces) example: [code] void exampleFunc() { int aaa[32]; } //when the function closes, the … | |
Re: Do you have to use c strings or can you use c++ strings? Here you have both references (c-style strings and c++ strings) [url]http://www.cplusplus.com/reference/clibrary/cstring/[/url] [url]http://www.cplusplus.com/reference/string/string/[/url] For the 1st problem, use the lenght function. 2nd, check the string character by character until A) You find a non digit (correct) B) The … | |
Re: You don't actually delete that because it's a visual aid. What you can do is disable that particular visual aid. What you want to do is go to EDIT -> ADVANCED -> View White Space to toggle that aid on or off. There's a couple of other aids you might … | |
Re: Instead of opening a new post with every problem you encounter you should do as you were advised in your other posts and learn how to do a couple of things before attempting to use this tool you don't know. You need to learn how to use libraries with Visual … | |
Re: It's like if you were trying to jump steps. What library are you using to interact with an SQL database? If your answer is none... Then you need to learn how to link and use libraries with your compiler. If there's a lib or API you're using. What you need … | |
Re: I always recommend learncpp.com as a great starting point. Very easy to follow. | |
Re: You won't always find a laid out tutorial for you but a quick glance at the documentation will many times tell you enough for you to make your own samples. Remember you can read header files too. This is has a good c++ API for handling databases in the client's … | |
Re: The wording of this post is weird. Maybe posting the relevant code in CODE tags might help. You can't return arrays. You can return a pointer to an array though. What do you want to do? Use that array within a function? In that case, I recommend you to google … | |
Re: I use libvorbis with OpenAl so I immediately thought about Theora. [url]http://www.theora.org/downloads/[/url] A quick google search also brought up this: [url]http://sourceforge.net/projects/libtheoraplayer/[/url] It's open source and royalty free but I don't know how suitable it migth be for games. Apparently, Ogre has a plugin, that could prove an interesting read: [url]http://forums.indiegamer.com/showthread.php?t=16110[/url] … | |
Re: IF you ever need to change this option from within the project go to linker->System and where it says subsystem choose either: Console (/SUBSYSTEM:CONSOLE) Windows (/SUBSYSTEM:WINDOWS) The point of Glut is to test OpenGl without having to mess with a Window API so stick to console projects. | |
Re: You might find interesting source code samples from the book "Programming AI by Example" from Matt Buckland. Check out the Lua projects. Do not copy paste. Much of that code is educational and a graphic adventure probably requires a pretty good design to avoid spaguetti patterns. | |
Re: Add VendMachine.cpp to your project. What compiler are you using? | |
Re: You probably need to be more specific as to what you need to get any help. Good advice if you're stuck is to turn of your screen and grab pen and paper and think it over until you know what you want to do. Then coding comes easier. Get on … | |
Re: The #include directive will, depending on wether it uses "" or <>, look in different places of your system to find the required files to compile. <> looks in your compiler's include directory. With Visual Studio this could be by default: C:\Program Files\Microsoft Visual Studio 9.0\VC\include "" first looks in … | |
Re: You're using ifstream instead of ofstream in this line: [code] ifstream file ("C:/Users/Brandon/Desktop/test.txt", ios::out | ios::app | ios::binary); //file to write[/code] You must also take into account that you won't be able to create files outside of the folder of your executable. You won't even be able to create a … | |
Hi, I've googled myself into this site many times and felt it was about time to make that tie stronger. Maybe I can even help if there's no one else around. I'm interested mostly in c++ programming at the moment. |