Posts
 
Reputation
Joined
Last Seen
Ranked #141
Strength to Increase Rep
+11
Strength to Decrease Rep
-2
98% Quality Score
Upvotes Received
54
Posts with Upvotes
52
Upvoting Members
38
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
35 Commented Posts
~227.75K People Reached
Interests
Programming, Electronics
Favorite Tags

481 Posted Topics

Member Avatar for Freaky_Chris

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 …

Member Avatar for rory jackson
2
4K
Member Avatar for dseto200

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

Member Avatar for Akash_22
1
7K
Member Avatar for OmniX

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 …

Member Avatar for Alex_34
0
2K
Member Avatar for guest7
Member Avatar for Dasun_1
0
31K
Member Avatar for Narue

[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

Member Avatar for Smn
18
13K
Member Avatar for FruitPunch

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 …

Member Avatar for Freaky_Chris
0
264
Member Avatar for hahanottelling

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

Member Avatar for Nick_3
0
5K
Member Avatar for tones1986
Member Avatar for giora88

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

Member Avatar for Narue
0
270
Member Avatar for UGndLord
Member Avatar for BMPaul

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

Member Avatar for gpyrounakis
0
2K
Member Avatar for Nickair

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, …

Member Avatar for Sonny101
0
157
Member Avatar for bangor_boy

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 …

Member Avatar for JKP()
0
183
Member Avatar for Falkoner1

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

Member Avatar for burcin erek
2
474
Member Avatar for kutukak

[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; …

Member Avatar for karthikeyanvani
-1
372
Member Avatar for lucy1234

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 …

Member Avatar for Adak
-5
2K
Member Avatar for ShadowOfBlood

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

Member Avatar for 1stDAN
0
4K
Member Avatar for mark0420

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 …

Member Avatar for vxp
0
284
Member Avatar for zkelvin2010

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?

Member Avatar for jwenting
0
83
Member Avatar for miskeen

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 …

Member Avatar for miskeen
0
161
Member Avatar for sandorlev

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 …

Member Avatar for sandorlev
0
156
Member Avatar for William Hemsworth

@CppBuilder I'd recommend getting an upto date compiler. You might find that they work properly then ;)

Member Avatar for William Hemsworth
1
2K
Member Avatar for gregarion

@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 …

Member Avatar for mrnutty
0
155
Member Avatar for tennis

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 …

Member Avatar for mrnutty
0
110
Member Avatar for sana zafar

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 …

Member Avatar for Freaky_Chris
0
248
Member Avatar for wafie
Member Avatar for Amurka

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

Member Avatar for alisneaky
0
2K
Member Avatar for gunjannigam

[code] JFileChooser jfc = new JFileChooser(); jfc.setDialogTitle("My Title"); [/code] Chris

Member Avatar for Freaky_Chris
0
84
Member Avatar for vbx_wx

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 …

Member Avatar for mitrmkar
0
2K
Member Avatar for sjgman420

Have a read of the fisher-yates shuffle or perhaps the durstenfeld algorithm for shuffling. Chris

Member Avatar for Freaky_Chris
0
885
Member Avatar for Singh_shalini90

Singh, Please do not hijack other peoples threads. I suggest you read the forum rules as you have just broken most of them. You're first post was a very bad one. I suggest you read and try again in a more suitable way. Regards, Chris

Member Avatar for Freaky_Chris
-4
93
Member Avatar for anuj10

do not use eof(); Do this instead. [code=c++] while(getline (openFile,line) != NULL); { cout<<line<<endl; } [/code] Chris

Member Avatar for mattjbond
0
267
Member Avatar for gajen007
Member Avatar for sawant_nitesh

[code=regex] ([a-zA-Z\. ]+,)|([a-zA-Z\. ]+<[a-zA-Z\., ]+(<[a-zA-Z\.,< ]+>)*>+[ ]*,) [/code] Does that help? Chris

Member Avatar for Freaky_Chris
0
86
Member Avatar for timbomo

Compare your code with that of ancient dragon, and study them hard, you will soon see what he is doing differently to you. Until you have had a good hard look and have some sensible suggests please stop posting loads of code that means nothing. Regards, Chris

Member Avatar for mattjbond
0
414
Member Avatar for jasneg16

I already gave you a solution in a C++ thread. Why do you keep cross-posting?

Member Avatar for WaltP
0
147
Member Avatar for edek

Please don't drag up 2 year old threads. And it should be noted that in standard C++ no there is not a way. Chris

Member Avatar for Freaky_Chris
0
465
Member Avatar for ndovu

please use [noparse][code=c][/code][/noparse] tags to post code, also please come to us with a specific problem, rather than asking us to program you homework

Member Avatar for Adak
0
135
Member Avatar for jasneg16

Using the stdlib.h header in conjunction with the time.h header you can generate pseudo-random numbers which will allow you to select a random fortune cookie. [code=c]#include <stdlib.h> #include <time.h> int main(void){ srand( time(NULL) ); // seed the random generator, with current time, making it a different seed when run each …

Member Avatar for jasneg16
0
82
Member Avatar for ojung

My advice, do not use eof() it's counter productive. Instead do this. [code=cplusplus]while(getline(file, someString)){ //yourcode }[/code] Chris

Member Avatar for onksssss
0
10K
Member Avatar for Feenix45

Your asking for a full code solution to your assignment? I think you may be going wrong there Chris

Member Avatar for Bart_uam
0
2K
Member Avatar for vijayr_singh

Please use code tags! Amen to Salem being a bot ;P You posted it everywhere...pretty lame lol. What amazes me is how you managed to come up with code for permutations, but cannot write what appears to be a simple loop.... Chris

Member Avatar for siriussam
-1
898
Member Avatar for jhegie
Member Avatar for Alibeg

Should be [icode]iostream.h[/icode] and you should be using [icode]std::cout[/icode] Chris

Member Avatar for chris_mccabe03
0
608
Member Avatar for NickT80
Member Avatar for Freaky_Chris

The following code snippet can be used to convert a decimal integer into any base from 2-16. This is a simple piece of code and I hope t proves useful to people. I see many people posting Decimal to Hex. or Decimal to binary, non any better than the next. …

Member Avatar for hehehe01
0
3K
Member Avatar for Freaky_Chris

This is a sample code snippet of a quicksort that uses templating and function pointers to allow the user to sort an array of anything from numbers to strings to structures. The idea is, that the coder writes a small function thats return type is bool, It should return true …

0
227
Member Avatar for Freaky_Chris

This snippet can be used to convert from bases between 2 & 16 to base between 2 & 16. This is an extension on converting decimal to any base snippet found here: [url]http://www.daniweb.com/code/snippet1067.html[/url] (By no means is this the best method of doing this, but provides rather a nice way)

0
681
Member Avatar for sahasrara

int main() is not a choice, it's standard! Don't make people start ranting. Also iostream.h shouldn't be used either, there are a whole host of reasons....and Borland is out dated! Also you really do need to free the memory! If you don't do it then people using the snippet wont …

Member Avatar for tux4life
0
136
Member Avatar for Gueito

I think you should look at all of your brackets, most of your classes are contained within the PreviousButton class or whatever it is called, so get counting :) Chris

Member Avatar for Freaky_Chris
0
145

The End.