cheers mat
Type: Posts; User: te5la
cheers mat
I have a bitmap loader with...
#pragma pack(push,bitmap_data,1)
*a few structures relating to the bitmap header files and rgbquad*
You have not included the standard library
#include <iostream>
#include <string>
using namespace std;
void main ()
{
const char* getSampleArray() const { return sampleArray; }
worked for me thank you very much for your replies.
not that experienced with c++ so i recommend you look up fstream but if you want a cheap way of doing it try reading and saving the file content first so something like.
#include <fstream> ...
Sorry im not that experience with c++ here is my code that im trying to get working.
class charArray
{
public:
charArray()
{
memset(...
the problem here is that i have an array of chars
char exampleArray[50];
and i want to create a function that returns this array so something like
char getCharArray() { return...
thanks for reply has helped but im getting a weird error with the line
void setSampleArray(char[] x){ strcpy( sampleArray, x ); }
the compiler says missing ')' before identifier 'x' any ideas?
Something like this will save an entered number into a text file named file in the directory of the cpp file
#include <fstream> //include file stream
#include <iostream>
int main()
{
...
How do I initialise a char array in a class definition?
class charArray
{
public:
charArray()
{
charArray[30] = {0};
sorted it thanks, forgot to send a pointer to function.
thanks for the replies but neither addresses the problem. It still crashes when trying to add a second dvd to the list. No compilation warning is given only when ran a windows warning screen appears...
Ive set up a simple program that is going to (eventually) store information about dvd's etc and write them all to file. The problem is that it crashed when i try to enter a 2nd dvd to the list...
I do? as it adds it to the list the first time round as well as the second but it is when it exits this function for the second time that the problem occurs.
void addToDatabase(ofstream...
Ive set up a simple program that is going to (eventually) store information about dvd's etc and write them all to file. The problem is that it crashed when i try to enter a 2nd dvd to the list...
I get.....
C:\Users\J\Desktop\openGL\OpenGame1\Main.cpp(452) : error C2065: 'KeyDown' : undeclared identifier
C:\Users\J\Desktop\openGL\OpenGame1\Main.cpp(452) : error C2065: 'VK_W' :...
I have written a program in opengl using c++ and i want to be able to fly along my scene by using the keyboard so far i have managed to do this using various functions however i would like to be able...
Am getting an error message while trying to create a vector of class objects.
std::vector<cannon> cballs;
cballs.insert(cballs.begin(), new cannon(5*ballNo,90,5));
Basically ive made a class that stores functions for a ball and then a main class that stores my world objects. From the main i create an instance of the ball using its constructor and an array (for...
ouch MacGyver delivers the final blow
Thanks guys.
How'd i make an array of class type objects here is my current call to create an instance.....
cannon * cball = new cannon(45,90,5);
This create an instance of cannon but i want multiple...
got it working now thanks.
Im having problems understanding headers, my background is in java programming so im not used to having to create header files and i dont really understand their use. Here are two classes ive put...
Thanks for your help again