481 Posted Topics
Re: Java comes with the Java2D API which allows you to create game in 2D, Get googling :D Chris | |
Re: can you not see the () on open? Its just you have two parameters inbetween them :P You will need to escape that '' characters "C:\\programs\\fileneedschanges" Then t shold work fine Chris | |
Re: Hey, could you share some more information with us. Specifically what OS and Compiler you are using. Thanks, Chris | |
Re: [CODE=cplusplus]for(int i=0;(i<50000 && (!Ofile.eof())) ; i++ ){ Ofile << arry; if(arry[i]<1 && (arry[i+1] && arry[i+2] == 0) ){ break; } cout<<arry[i]; }[/CODE]Do not use eof() it can return true before the end of file is actually reached. Ofile << arry; shouldn't you be reading from the file not trying to … | |
| |
Re: What exactly do you mean by hide, as in minimize? if so then look at CloseWindow(). Otherwise you will need to explain more. Chris | |
Re: [url]http://www.daniweb.com/forums/announcement8-3.html[/url] [url]http://www.daniweb.com/forums/thread78223.html[/url] [url]http://www.catb.org/~esr/faqs/smart-questions.html[/url] Have a nice day. Chris | |
Re: erm did i miss something or do you not just want an array? atom myAtoms[100]; Chris | |
Re: [QUOTE=Freaky_Chris;770087][url]http://www.daniweb.com/forums/announcement8-3.html[/url] [url]http://www.daniweb.com/forums/thread78223.html[/url] [url]http://www.catb.org/~esr/faqs/smart-questions.html[/url] Have a nice day. Chris[/QUOTE]. | |
Re: You could of at least looked at the most recent posts :\ [url]http://www.daniweb.com/forums/thread165795.html[/url] [url]http://msdn.microsoft.com/en-us/library/ms682425.aspx[/url] Chris | |
Re: [code=cplusplus]ofstream myfile("example.txt", std::ios::app);[/code]Hope that helps :P app stands for append btw Chris | |
Re: Indeed createprocess is the much better choice, it gives you much more control over the outcome of everything. BTW: IF it's solved could you please mark the thread as solved Thanks, Chris | |
Re: I agree with clockowl. Anyway, when you say you were asked....by who your lecturer. Something tells me you wouldn't be asked to do something like this if you hadn't already been taught most if not all the material you need to do this. I suggest you look at winsock. It … | |
Re: thats the function prototype, it shows that the function has a return type of HWND andtakes two parameters. A HWND and an UINT. msdn then explains what each of the parameters are, it also lists all the possible options for the UINT uCmd and then it states what exactly is … | |
Re: Well if you store all the information into a map, then could just call the map by the name... [url]http://www.cplusplus.com/reference/stl/map/[/url] Chris | |
Re: I think your going to have to give more detail here...Are you using MFC? If so then a password box will automatically do this.... Again we really need more information Chris | |
Re: take a look at the ctime header. If you need more accurate results then you will have to go into OS specific functions Chris | |
Re: You can use SetCursorPos() to control the position of the cursor. It returns true is it succeeds and false if not. It takes 2 arguments int x and int y. You can use GetCursorPos() to retrieve the position of cursor. it returns the same as Set...() it takes one paramater … | |
Re: It worked fine for me. Try adding this at the end instead.[code=cplusplus]cin.ignore(100, '\n'); cin.get();[/code] Chris | |
Re: Sounds to me like you need to link the required libraries into your project ready for linking Chris | |
Re: Static memory space is generally very limited, if you want to create large array sizes then you need to use dynamic memory.[code=cpluplus]__int64 *array = new __int64[2000000];[/code]But be sure to delete the array afterwards[code=cplusplus]delete []array; array = NULL; // to make sure you do not use the pointer[/code] Chris | |
Re: I tend to rush some poor front end of some kind, so i can create the back end to interact with the front end more accurately. Then I go back and redesign the front end. Sort of a testing/debugging front end more than an actually front end. Chris | |
![]() | Re: No cin.ignore() is designed to clear everything before a given character or for a given length, not clear the given character. Chris |
Re: [QUOTE=williamhemsworth;766695]Or simply?[CODE=CPLUSPLUS]#include <windows.h> int main() { CopyFile( "source", "destination", true ); }[/CODE][/QUOTE] Providing your developing on a windows machine and want unportable code. | |
Re: [QUOTE=Liinker;766582]Under your post, click "Edit this post" Then add [*code=c++] before your code and [*/code] after but without the *'s.[/QUOTE] [noparse][noparse][/noparse][/noparse] tags are also brilliant! I agree with ddanbe, you should start simple. Don't just dive into someone elses code and expect to be able to understand it all from … | |
Re: If you zip the file then you should be able to sen it with no problems. The other user will just need to unzip the file and then run the exe Or you cuold go down the root of changing the extension Chris | |
Re: [QUOTE=BattlingMaxo;763977]What is the difference between hkeletal animation and procedural animation? I get different answers each time[/QUOTE] Skeletal animation is about manipulating bones attached to different polygon groups. This makes animation easy and quick, however it is also some what more limiting that procedural which runs in real time. Procedural can … | |
Re: something like this. [code=cplusplus]class a{ public: void someFunction(){ std::cout << "hello"; } }; class b{ public: a myClass; }; int main(void){ b aClass; b.myClass.someFunction(); std::cin.get(); return 0; }[/code] Or is inheritance what you are after? Chris | |
Re: Thanks for the very nice post! Makes my life so much simpler. The solution, you need to clear your stringstream before throwing the next string at it. Using [icode]ss.clear();[/icode]. Then in your loop that prints the results out, you need to change the way in which you access your vector … | |
Re: What exactly do you mean, 'the image'. It could be a whole host of reasons. Chris | |
Re: Don't see why it doesn't work, but long story short! Get an IDE that isn't frozen. Like Code::Block or VC++ Chris :D | |
Re: I think his answers your question...although i'm not entirerly sure :D [code=cplusplus]#include <iostream> #include <vector> using namespace std; template <class T> class test{ public: test(T[]); void print(); private: vector<T> v; }; int main(void){ char myArray[] = {'a', 'b', 'f'}; test<char> myClass(myArray); myClass.print(); cin.get(); return 0; } template <class T> test<T>::test(T … | |
Re: When reading files in binary you must specify whether you are opening it for in or out operations or both using [icode]fstream videoFile("myVideo.m2v", ios::in | ios::out | ios::binary);[/icode] that would open the file for input and output in binary mode. you use single quites for char's also is by zero'ing … | |
Re: if your developing for windows and don't wanna go download some extra libraries and things then you can use the Win32 API. It give's you all the stuff you need to do this, just if your a beginner it might be a little complex. Chris | |
Re: You can't even be bothered to re-write the question!!!! or copy and paste!! This is new levels lazyness, i actually cannot believe it! Chris | |
Re: The first part is correct. The second part well shouldn't really be a problem [code=cplusplus]D3DXCreateTextureFromFile()[/code] Allows the use of png files... Perhaps i mis-understood your question? Chris | |
Re: I'm guessing that the only way you could do this would be to use the windows api and or pdcurses library and move the cursor around as you please...which is not going to be as simple as you are hoping. I guessed if you are using managed C++ then it … | |
Re: Please use code tags. These a thread related to them infact there all over the place! Chris | |
Re: in your if statements you are assign the value of 0 and 1 to your variable a, thus it will always evaluate true. I'm guessing you should be using ==. Also since you have an unanitialized variable a, using the == would just be dangerous.... Chris | |
Re: [QUOTE=sid78669;759232]Also, if you are inputing straingth from the console, you may try getchar(), the one i mentioned above is for reading from streams. :IDEA:[/QUOTE] There's and edit button for a reason :P @OP You may think it looks a bit confusing but it's really not that complex Chris | |
Re: you will need to do some form of string parsing. Firstly you need to read from the file you can use the following method [code=cplusplus]ifstream f("savefile1.txt", ios::in, ios::binary); string line; getline(f, line);[/code] once you have something to work with then you can begin parsing the string. string streams useful here, … | |
Re: I would read the input in as a string, then loop through each charcter in the string and check whats its value is using some boolean values to make note of things. cctype header has some nice functions such as isalpha and is digit that will allow you to accomplish … | |
Re: Your question is a bit bizzare. What do you mean by week name? But perhaps this would be helpful [url]http://www.cplusplus.com/reference/clibrary/ctime/localtime.html[/url] Chris | |
Re: Visual C++ Express also has some nice stuff to it...so it's worth looking at both that and Code::Blocks and seeing which you prefer to work with....also VC++ allows you to used managed C++. P.S If the you have your solution please mark the thread as solved. Chris | |
Re: [URL="http://www.letmegooglethatforyou.com/?q=Sorting+Algorithms"]How to Sort something[/URL] Chris | |
Re: [url]http://www.catb.org/~esr/faqs/smart-questions.html[/url] | |
Re: For DevCpp i'm guessing the easiest fix for you would just be to create a new project and put all of your files into that project and then compile it. Chris | |
Re: I guess thread spawning would class as recursion too? Embed Python code into your C++ and do the following. [code=Python]print "Hello World\n"*100[/code] :D Chris | |
Re: Read the bulletin about code tags too. Chris |
The End.