- Strength to Increase Rep
- +11
- Strength to Decrease Rep
- -2
- Upvotes Received
- 54
- Posts with Upvotes
- 52
- Upvoting Members
- 38
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
- Interests
- Programming, Electronics
Hey, im having a problem retrieving information about some files due to the fact either the file name or the extension is too long. For example i want to retrieve the size of a file only i call [CODE=Python]os.path.getsize("somelongfilename.txt")[/CODE] Note that it may not be a .txt extension, but it … | |
Re: create a list of which characters have been hinted and check the new hint doesn't match any of the previous. You can also limit people to X amounts of hints too Chris | |
Re: Firstly, don't use sysrtem. use the function given to you by AncientDragon. Secondly for an example, read the page it has a link to one. Thirdly, that page tells you what parameters are needed, what they could be and what they do. Also it tells you what headers you need … | |
Re: I think you're confusing people with the use of the word bit | |
Re: [QUOTE=AHUazhu;759197]cout.flush ????[/QUOTE] This is a discussion about flush the INPUT buffer....so this is a completely pointless post, before making a suggestion at least make it a viable suggestion Chris | |
Re: Hi Fruit Punch, Welcome to DaniWeb :). Without any of your code as a starting point it is very difficult for us to give you a direct answer, but we prefer to give you the information you need to get your results anyway! @cool_zephyr's approach will work, however it is … | |
Re: What do you mean by 'Text'? As in an editable text control? or just writing painted onto the windows? there is a big difference. Chris | |
Re: Whats the exact error, thats the easiest way :) Chris | |
Re: On windows the following code will move the mouse cursor.[code=cplusplus]#include <windows.h> int main(void){ SetCursorPos(50, 50); return 0; }[/code]Of course you will want to play around with that. If you want more detail just ask Chris | |
Re: Hate to tell you this, but they don't exist in C either. Chris | |
Re: Can i suggest you store the value of BM outside of the structure and store it in a char array of size 2 then write each one to the file before calling write() on the structure. Chris | |
Re: Does w3schools even mentiod Java as far as im aware its a web programming site. Link number 5, didn't you read responses to this thread that suggested you do [I]not[/I] use an IDE like NetBeans. Read the sticky at the top and get started, a good link is [url]http://java.sun.com/docs/books/tutorial/[/url] Also, … | |
Re: In reply to your question bangor boy, [CODE=java]public void showFeelings(int howManyGoals) { switch (howManyGoals) { case 0: case 1: case 2: System.out.println("Oh dear, not very good"); break; case 3: case 4: case 5: System.out.println("Ive seen donkeys shoot better"); break; //and so on } }[/CODE] Also why is your name Bangor … | |
Re: Can I draw your attention to this snipped post by [I]Narue[/I] in the input stream clearing thread [code=cplusplus]#include <istream> void ignore_line ( std::istream& in ) { char ch; while ( in.get ( ch ) && ch != '\n' ) ; }[/code] Chris | |
Re: [code=cplusplus]#include <iostream> #include <windows.h> using namespace std; int main(void){ bool updown = false; while(1){ if(!updown){ for(int x = 0; x < 100; x++){ for(int y = 0; y < x; y++) cout << endl; cout << " .---. "<< endl; cout << " /__\\__\\ "<< endl; cout << ".---------------."<< endl; … | |
Re: Lucy, What Adak is suggesting is that rather than us telling you the bet way to do things you should research the algorithm, see what searches are a possibility then decide whether you want to be CPU intensive or stack hungry. You make some descisions about it, try and write … | |
Re: A combination of modulus division and normal division will do this nicely for you. You have way to many steps, you can retreive each number in 1 line of code using both normal and modulus division. its all to do with 10^x in a way xD Chris | |
Re: Just to pop in as a reality check. Simple user input guessing game and such are simple to achieve and C++ perfectly capable. If however you are wanting to look into something not text based and a using graphics....more like a modern game for example Call of Duty. Then you … | |
Re: Do you understand how to work with file streams? Do you understand how to implement a pow method? Either your own or the existing one? | |
Re: You can define a class wide variable within your class. [code=cpp]class myClass { private: myStruct mS*; }[/code] Which will allow you to access mS in both functions, so you could allocate the memory to it in one function. Use it in a second function and then deallocate it in another … | |
Re: I dislike vsc++ but there we go. I just compiled it on MinGW with no problems what so ever, i was presented with a list of the address that your data was stored at. if you want the data to be printed you will need to use **it not just … | |
Re: @CppBuilder I'd recommend getting an upto date compiler. You might find that they work properly then ;) | |
Re: @tintin, Recommending the use of a recursive solution is rather an obscure method of helping someone out. Since everyone knows that a recursive function isn't exactly the most efficient solution by any means, although in normally provides a neater looking solution that is easier to code. 99 times out of … | |
Re: No, if its type BO then it will be BO.m, if its type DO (derived object) then it would be DO.m But when a destructer is called, it would execute D constructor first (i beleive this is the order) then B destructor. The M method in the derived class masks … | |
Re: don't use eof() use file.is_good(); Also, the reason you are getting random numbers is because you don't initialise your array. [code=cpp] int count[N]; [/code] becomes [code=cpp] int count[N] = {0}; [/code] The reason it prints after everyline is because you call your function for each line, and it is your … | |
Re: What is your problem? | |
Re: alisn you should start up your own thread rather than reviving old threads. [code=java] System.out.printf("%1$10d%2$11.2f%3$10d%4$11.2f\n", i, QQ, d, inventory); [/code] Chris | |
Re: [code] JFileChooser jfc = new JFileChooser(); jfc.setDialogTitle("My Title"); [/code] Chris | |
Re: Luke you are assuming the use of VC++, it might be unmanaged C++ he is using. Rather than passing what type of connection you wish to check, you should be passing a pointer to a data structure to hold the different connections that are avaliable to you. So you should … | |
Re: Have a read of the fisher-yates shuffle or perhaps the durstenfeld algorithm for shuffling. Chris |