I'm having difficulty correcting the following compile error.
Any help would be appreciated.
Source.....
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
using namespace std;
struct strA
{ char a;
int b;
} _attribute_ ((packed,aligned (8)));
int main(int argc, char **argv)
{
int mainrc=0;
return mainrc;
}
Compiler.......
g++ --version
g++ (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
ERROR.........
g++ -std=c++11 /home/arcdeveloper/csrc/structatt.c++
/home/arcdeveloper/csrc/structatt.c++:9:17: error: ‘packed’ was not declared in this scope
/home/arcdeveloper/csrc/structatt.c++:9:34: error: ‘aligned’ was not declared in this scope
Thanks in advance, gtyler
Bookmarks