but if you haven't a clue, you should start at the tutorial introduction and work through some things until you feel confident to tackle the file splitting puzzle. Orphaned files are a nightmare, if you don't catch errors and close the file before your program exits correctly.
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
In this code assuming you keep your numbers in the file "Sample.txt" file and after you run the code you will get 10 files generated with the names such as File0, File1 etc. Each of these files consist of 10 numbers.
I agree with dusty_dex, the poster should have attempted a solution first, instead of being provided a cut and dry answer to his homework. This is not a forum for quick homework answers, and should be kept clear of students who are too lazy to attempt solutions to their homework. If the poster had provided sample code and asked for bug hunting help, then it would have been a different matter entirely.
I am quite a newbie to C++ programming and I got stuck up with a simple program. The program requires me to print the value for 2 raised to the power 20. I actually had the idea creeping about this program since 1 megabyte is 2 raised to the power 20. I wanted to find the result of that via this piece of code:
for (int i=2; i<=20; i++)
and the output I get is: 0
The compiler/IDE I'm using is Borland C++ (latest version) but I know theres nothing wrong with the compiler though. There must be some logical mistake. Rectification would be appreciated folks. Hoping for help.
a is a integer data type .you are printing the value by multiplying it 19 times and which in return it exceeds more than LONG data type .hence your output is always zero .
There is no compiler problem.
I think you got what I am explaining you.
I am not sure this question belongs here, but I am attempting to reach wide audience.
Just installed DirectX 8.1 and it will work for me.
Got distracted into installing DXSDK June2010 version because it was “advertized” especially for XP.
Had a heck of time uninstalling it, because it did not have much of DirechShow in it.
Now I found a tutorial for DirectX 9.0.
I certainly do not want to repeat the fiasco of DXSDK June2010 installation.
What really scares me is the “DirectX (9.0c) is a system's (resource) and cannot be uninstalled”.
So here it my question – what is current, usable, with DirectShow sample codes DirectX (SDK) still workable under XP?
And as I said - I am "happy" with DirectX 8.1.
It seems that MS is now supporting only Win7 and up with their DirectX SDK's.
Please – no more “XP is going unsupported by 2014”, heard that too many times, and that is not what I am asking for.
Thanks for reading.
Just run dxdiag and it reported DirectX 9.0c installed! I am going to finsh my app using 8.1 before reinstalling anything. This is realy scarry beacause I did instaled 8.1 only!
Under normal circumstances,if the second parameter of the InternetOpen is INTERNET_OPEN_TYPE_PRECONFIG ,The function will automatically follow the registry select proxy. The important is automatically.
But in my program, I call InternetSetOption set proxy, and the problem is the internetopen can not automatically follow the registry select proxy any more.
I can change the proxy but .
How can i change it back ? to automatically.
please help , its realy pressing. Thanks.
the code :
InternetSetOption(NULL, INTERNET_OPTION_PROXY, (LPVOID)&oProxyInfo, sizeof(oProxyInfo));
Q1. What would be the contents of queue Q after the following code is executed and the following data are entered?
Q = createQueue
Loop (not end of file)
If (number not 0)
Enqueue (Q, number)
Queuerear (Q , x)
Enqueue( Q , x)
Data are – 5, 7, 12, 4, 0, 4, 6, 8, 67, 34, 23, 5, 0, 44, 33, 22, 6, 0
Choosing which information that Windows Vista's folder contents displayer is to display for each folder. Please, how, from within a Visual C++ program, can I tell my Windows Vista's folder/directory contents displayer, to display for each file in folder/directory X this: Name, Size, Dimensions, Date modified, and nothing else? (I know how to search through a tree of folders from within a Visual C++ program.)
Or, please what is the web address of the online information page where I can read how to do this?
Earlier today (by British time) I called Windows Vista's folder/directory contents displayer's "search for a file", and in every folder that it looked at, it reset the information display pattern to Name, Folder, Tags, Size, Rating, Dimensions, Date modified. (I have no use for Rating; what are these Tags?; the Folder column is no use except in a search result.) To avoid this, ahould I resort to "the trail and the packhorse again" and write my own folder-tree-searcher?
The information for what columns to display comes from the subkeys of HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags. You can employ a registry monitor to see how the values behave as you adjust the columns.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
I found my computer's regedit and made a shortcut to it and dragged that shortcut onto the desktop.
Using it I found my HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\, but in that subtree "Windows" I found no sub-subtree Shell or Bags. I have Windows Vista.
Please, is there anywhere a guide to the registry telling me what its hundreds or thousands of entries are for?