I need to read a data file using C++, it's a data file that contains a row of column headers before the actual data. I need C++ to remove the header and re-print just the data into a new data file. Any suggestions?
Use iostreams. MFC file reading is crap.
You just want to read the first line and discard it, then read and keep the rest ? Use getline, an ifstream and an ofstream ( or a stringstream to read the file, then write it to the same file in a seperate operation ). I've written articles on this here on CP, you should have no trouble finding them.
Im confused about how to create a C++ constructor that uses the current time from the time() function that will declare in the C++ standard library header
Hi
i have tried utilities like Dumpbin, OLEview, DEPENDS but we only get the function names. Is there any way to know the prototype of a function exported by a DLL.
If you are good at reverse engineering, you can try to find a call to that function. Than look at the sthings that are pushed onto the stack. That should give you an idea about how many variables are used by the api. There is one catch though, you don't know what the variables types are, nor do you know what they are used for.
I don't know why you need to do that, but if you're planning to use undocumented api's, I can only say that you should not! They are not documented for a reason. The could be subject to change, or complete removal, so in the long run, it will break your program.
I have a script that I have compiled on two different computers. On one the file size is 500kB, and on the other 1.23MB. Both were compiled with DEV C++. They both seem quite large given the script. Can anybody explain this. I should explain I am a beginner. The script is:-
#include <iostream>
#include <windows.h>
using namespace std;
Is it possible to make an application window that is larger than the desktop? Does Windows allow this? Or must I use the GDI to do this? Wouldn't the GDI just make an image of the app window without the true functionality inside? Thanks.
I use the getcursor position func and to get the handle of an app window above my mouse cursor. For testing I used the calculator app. I called the api to increase the size. Strangely the width increased, but not the height. The width never increased greater than the width of the actual desktop. I call MoveWindow(mywindow, 0, 0, (width * 100), (height * 100), TRUE). I've tried setting the x,y position to be the center of the screen. It will draw the app window; half on screen half off screen. However, the total window size is never greater than the desktop size.
Is there a way to add controls to the Windows taskbar. I can create icons. I've tried app bars, but they take up too much space (I only need like 3 buttons) because I end up creating in essence a 2nd task bar on the screen (Window's task bar on the bottom and my app bar on the right side). How about making separate icons for each "button"? That's the only other solution that I can think of.
i trying to disable mouse wheel in comboBox , i try to find this option in propertise but i dont find this option .
In comboBOx control i also can`t find this option.
In my VC++ application i have a bitmap of the class CBitmap. How i can get the binary value of a pixel from that bitmap. Whether it is possible to get the value using BITMAP structure or by using CImgeList.
if you need quick access to all pixels, you'll need to use GetDIBits . that will give you a DIB, which is a BITMAPINFOHEADER struct followed by the pixel data - vertically flipped, probably stored in BGR order (maybe BGRA depending on your video driver), with pixel rows padded to multiples of four bytes.