It seems the file I was reading was different kind from what I thought it was. I'm sorry I wasted your time.
Type: Posts; User: Argyle
It seems the file I was reading was different kind from what I thought it was. I'm sorry I wasted your time.
My bad. I explained the problem badly :p. I don't mind the change in the 'chunk's value. It's just that the CHUNK_MAIN and CHUNK_EDIT cases should execute and not the CHUNK_MAIN and the default case....
Dino, if by non-working example, you mean what it outputs:
when the default case is commented it outputs:
but when default case is uncommented it outputs:
Now, AFAIK the existance of...
Yes ,that's the problem.
For some reason the following code jumps from the first case to the default case :
while(file.read(chunk,2))
{
switch(wordToshort(chunk))
{
case CHUNK_MAIN:...
It seems I forgot to post "Stack.cpp", sorry about that.
Really, all I wanted for the code to do, was for it to compile. That is all.
But thanks for the help.
The argyle
Im kind of lost here; Mingw gives me a "Expected a constructor,destructor or type conversion before '.'token"
main.cpp
#include <iostream>
#include "Stack.h"
Stack s;
Yes, that was the problem, thank ppl :D
main.cpp:
#include "includes.h"
SDL_Rect r;
r.x=16;
SDL_Rect r;
r.x=16;//Removing this line clears errors
produces:"Expected constructor destructor or type conversion before '.' token'.
MinGW, WinXP
Odd, it was an other header file... Why did it show up in that .cpp file.:confused: Thanks for help.
I try to compile the following .cpp file, but I get a "expected init-declarator before "enum":
Windows XP, code::blocks and Mingw
Setup.cpp:
#include "Setup.h"
#include "includes.h"
enum...
So instead of v.VecLength(v) i should have v.VecLength?
Oops! :eek: Thanks for pointing that one out!:)
The arithmetics of the program are incorrect
mvector.h
#include <cmath>
#ifndef _MVECTOR_H
#define _MVECTOR_H
namespace math
{
class Vector
Yeah I guess I should review my classes 101...
Thanks for comments.
My compiler refuses to compile this code because of "ISO c++ forbids 'in-class initialization of non-const static member `ExStyle' ' How can I bypass this? Using Dev-cpp on Windows
Thanks.:)
...