h*b=flaeche;
printf("\nDie Fläche des eingegebenen Rechtecks ist %lf\n",flaeche);
should be
flaeche = h*b;
Type: Posts; User: mad-hatter
h*b=flaeche;
printf("\nDie Fläche des eingegebenen Rechtecks ist %lf\n",flaeche);
should be
flaeche = h*b;
//bool hasWon = false;
const int size = 10;
bool arr[size] = {0};
int count = 0;
for (int i = 0; i < size; i++) {
if (arr[i]) {
count += 1;
}
}
Hello userxbw,
I don't think its an OS problem.
When the program is running, it knows what to do with mouse cliick events and the keyboard.
What I want to do is on a menu item click, send the...
Hello.
Thanks.
I still need to 'cout' right mouse click.
Regards
cout << right mouse click;
cout << "circle\n";
Hello,
If I right click the mouse and type 'circle'/return then '10,10'/return then '15'/return,
the program does what is ecpected.
I'm running this code from a menu click and would like to...
Hello,
Some files are repeated, 00182 and 00146.
A random number generator can repeat the same number, they are not unique they are random.
If you want no repeats, you have to make some sort of...
Hello,
The compiler is clever enougth to work out which is a function and which is a variable.
It is permitted but considered bad practice, it can lead to confusion when the code gets more...
Hello,
%d and %f are different number formats, integer versus float.
printf - C++ Reference
Regards
Have a look here:-
c++ - Why isn't sizeof for a struct equal to the sum of sizeof of each member? - Stack Overflow
Windows 10
Hello,
I've got a Sandisk Cruzer inserted in a USB hub.
With the code included I can eject & unmount the stick.
It does'nt show in Windows after I run the code, so I'm guessing it...
Hello,
Thanks for the code.
Is this better?
if ( (infile.read((char *)buff.data(), size)).eof() )
{
std::cout << "EOF reached!" << endl;
Hello,
I'm reading a USB stick into an unsigned char vector.
Not a problem, Method 1 is obviously faster than Method 2.
As you can see I'm reading into a buffer and then putting the data into...
Hello,
You've got to seed the random number call.
Have a look here at the last post.
Generating random integer values within a range in C - Stack Overflow
and why the ';' after the '}' ?
...
Hello,
Not yet, but playing. Thanks.
Regards
int main()
{
Hello.
algorism
Opening (rb) makes a lot of difference (my mistake).
fread whole structure (again my mistake), I was printing upto a
certain point in the structure.
Elkvis
I'm...
fpos_t
Object containing information to specify a position within a file
This type of object is used to specify a position within a file. An object of this type is capable of specifying...
Hello algorism,
Windows 10 - 32 bit
gcc version 5.3.0 (i686-posix-dwarf-rev0, Built by MinGW-W64 project)
Compiling from within Qt Creator 4.2.0
*.pro file
CONFIG += console
...
Hello,
I'm trying to get the file pointer position.
The result I'm getting is 4096 when I know its less.
I understand that the 4096 is probably the cluster size.
I know I can count the read...
Hello Codeplug,
Thanks for that.
Reverted to the original method.
Regards
int newPos = 2048;
Hello,
Windows 10
gcc 5.3.0
I'm opening a USB memory stick for read.
I can read the beginning of the stick ok, then I try to reset
the file pointer to another position and fail.
What am I...
Hello,
Found this a long time ago, a quick runtime check.
This works with gcc, don't know about the MS compiler.
unsigned int max = -1;
printf("max = %u\n", max);//max = 4294967295
Regards
Hello,
Windows 10
How to get file info from a Multi-partitioned SD card.
I understand that Windows does not recognise extra partition/s on an SD card.
So far I've managed to get the info...
Hello,
How to detrmine if a Windows HDD partition is primary or logical using 'C' or 'C++'.
Thanks.
Regards
Hello,
Isn't a bool just true or false?
Regards
Hello,
The GNU C Library: Infinity and NaN
or maybe something like:-
if (myNumber == 16331239353195370)
{
//do something)
}