Forum: C++ Jan 6th, 2009 |
| Replies: 2 Views: 423 |
Forum: C++ Jan 6th, 2009 |
| Replies: 2 Views: 423 Could some please explain why this code is outputting 1 when it should be 1.5;
#include <iostream>
using namespace std;
int main()
{
double a = 3/2;
cout << a;
} |
Forum: C++ Jan 3rd, 2009 |
| Replies: 6 Views: 1,581 |
Forum: C++ Jan 3rd, 2009 |
| Replies: 6 Views: 1,581 I did what freaky_chris suggested and created the value of BM outside of the bmp_header struct and it seems to work. Final code is now
#include <fstream>
#include <iostream>
using namespace... |
Forum: C++ Jan 2nd, 2009 |
| Replies: 6 Views: 1,581 Thanks 4 your help. Ill experiment with what you told me today |
Forum: C++ Jan 2nd, 2009 |
| Replies: 6 Views: 1,581 Hello, im a noob with C++ at the moment and Im trying to create a BMP image from pixel data stored in a array. Everything seems to work except that when i look at the file generated in a hex editor i... |