is there any way to load an image file (jpg or bmp), modify it, then save it back. For example, change all pixels with the RGB code 0000FF (0,0,255) to FF00FF (255,0,255) or something along these lines. looked through the api, couldn't find anything along those lines, but i may not have looked...
another problem...if I use this to display a clock, it needs to refresh often. The only way I know to refresh it is to repaint, but then the entire screen goes white and there it flashes every time it refreshes. Since I can't control exactly when it refreshes, it does it multiple times...
thx for the help...I understand that it is preferable to check the api first, but I'm kinda new and some parts are still a bit over my head...it's also sometimes hard to find the right one to check.
if you continue to read from the file, it should treat the line feed char (enter) the same as a tab or space, and continue to read regardless of line
what are you using to read from the file?...i only know ifstream from fstream.h, it seems to work fine with multiple lines
so basically you'd want:
#include <conio.h>
#include <algorithm>
void main ()
{
const int size = 12;
double array [size];
for (int i = 0; i < size; i++)
{
cout<<"Please enter each months sales amount for the year starting with January : "...
so do u need the C++ file for use in a separate compiler, or do you just want the executable?
if you only need the executable, open the project folder, and in debug, there's a .exe file. that's the program, which can be moved anywhere.
I need a way of accessing the current time, and have no idea how. I was thinking of something along the lines of:
int hour
int minute
int second
int millisecond (maybe float second instead)?
I would then set each of these values to the current value (based on the system clock) and work with...
i need to clear the screen (but have the output start at the top). I believe this will use the cout.clear function, but am unsure how to use it. any help is greatly appreciated.
AV
Hi...i'm getting many (at least 10) parse errors in my program. First of all, i have no idea what 'parse' is.
an example of code, then my error follow. I'm only including one function of the program, all parameters (variables) are properly declared and sent; the function is not overloaded...
thx for pointing out the kbhit () function
looked around and found out exactly how to use it....for some reason i keep getting the error :implicit declaration of function `int kbhit(...)'
what this means, i have no idea, but i get it when i make my own program, copy yours, or copy others
how can i have a user press a key (left or right) and have the program recognize it (without an enter)
this program will be running in a loop; it should continue whether or not a key is depressed.
Does anyone know how to get any key pressed by a user?
ie. in a loop, if user presses [right], a variable is incremented, if a user presses, [right], a variable is decremented. I also want this loop to continue running whether the user presses a button or not.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.