Click here to Skip to main content
15,887,083 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: From framebuffer to SPI via ioctl in Linux Pin
Vaclav_24-Apr-18 12:16
Vaclav_24-Apr-18 12:16 
GeneralRe: From framebuffer to SPI via ioctl in Linux Pin
Jochen Arndt24-Apr-18 21:07
professionalJochen Arndt24-Apr-18 21:07 
GeneralRe: From framebuffer to SPI via ioctl in Linux Pin
Vaclav_25-Apr-18 3:36
Vaclav_25-Apr-18 3:36 
GeneralRe: From framebuffer to SPI via ioctl in Linux Pin
Jochen Arndt25-Apr-18 4:20
professionalJochen Arndt25-Apr-18 4:20 
GeneralRe: From framebuffer to SPI via ioctl in Linux Pin
Vaclav_25-Apr-18 9:11
Vaclav_25-Apr-18 9:11 
GeneralRe: From framebuffer to SPI via ioctl in Linux Pin
Vaclav_25-Apr-18 9:11
Vaclav_25-Apr-18 9:11 
AnswerRe: From framebuffer to SPI via ioctl in Linux Pin
Vaclav_23-Apr-18 5:21
Vaclav_23-Apr-18 5:21 
Questionerror: expected unqualified-id before numeric constant Pin
Vaclav_22-Apr-18 16:49
Vaclav_22-Apr-18 16:49 
I need some help, again.

I am posting only what I hope is relevant code, if not ask for clarification or ignore my request.

Basically struct issue.
The error is
/media/os64/Eclipse/eclipse/Workspace/Eclipse_Oxygen_1A/VNA_2/src/MODULES/M_SPI/C_FB.h:63:20: error: expected unqualified-id before numeric constant
#define VGA8x8_IDX 0
^
and I have no idea why. Just guessing something to do with struct initialization, but why?

The code is in header file which contains data to "build" ASCII characters in pixels to be output to TFT display.
I did move all into a class but got same error on #define VGA8x8_IDX 0.



Here is part of the "font" code
C++
static unsigned char fontdata_8x8[FONTDATAMAX] = {

	/* 0 0x00 '^@' */
	0x00, /* 00000000 */
	0x00, /* 00000000 */
	0x00, /* 00000000 */
	0x00, /* 00000000 */
	0x00, /* 00000000 */
	0x00, /* 00000000 */
	0x00, /* 00000000 */
	0x00, /* 00000000 */

	/* 1 0x01 '^A' */
	0x7e, /* 01111110 */
	0x81, /* 10000001 */
	0xa5, /* 10100101 */
	0x81, /* 10000001 */
	0xbd, /* 10111101 */
	0x99, /* 10011001 */
	0x81, /* 10000001 */
	0x7e, /* 01111110 */






Here is the failing #define

#include "TEST_FONT.h" // local copy
#define VGA8x8_IDX 0
#define DEBUG


And the structs code

C++
struct fbcon_font_desc {
    int index ; // idx;
    char *name;
    int width, height;
    unsigned char *data;   // font data
    int pref;
}font_vga_8x8;

struct font_vga_8x8 {
    VGA8x8_IDX,
    "VGA8x8",
    8,
    8,
    fontdata_8x8,
    0
};


AS always, help will be appreciated.
Cheers
AnswerRe: error: expected unqualified-id before numeric constant Pin
Richard MacCutchan22-Apr-18 22:20
mveRichard MacCutchan22-Apr-18 22:20 
AnswerRe: error: expected unqualified-id before numeric constant Pin
Jochen Arndt22-Apr-18 22:58
professionalJochen Arndt22-Apr-18 22:58 
AnswerRe: error: expected unqualified-id before numeric constant Pin
Vaclav_23-Apr-18 3:04
Vaclav_23-Apr-18 3:04 
AnswerRe: error: expected unqualified-id before numeric constant Pin
Vaclav_23-Apr-18 4:57
Vaclav_23-Apr-18 4:57 
GeneralRe: error: expected unqualified-id before numeric constant Pin
Richard MacCutchan23-Apr-18 6:42
mveRichard MacCutchan23-Apr-18 6:42 
GeneralRe: error: expected unqualified-id before numeric constant Pin
Vaclav_23-Apr-18 8:11
Vaclav_23-Apr-18 8:11 
GeneralRe: error: expected unqualified-id before numeric constant Pin
Vaclav_23-Apr-18 13:36
Vaclav_23-Apr-18 13:36 
GeneralRe: error: expected unqualified-id before numeric constant Pin
Richard MacCutchan23-Apr-18 21:05
mveRichard MacCutchan23-Apr-18 21:05 
GeneralRe: error: expected unqualified-id before numeric constant Pin
Vaclav_25-Apr-18 3:42
Vaclav_25-Apr-18 3:42 
GeneralRe: error: expected unqualified-id before numeric constant Pin
Richard MacCutchan25-Apr-18 4:59
mveRichard MacCutchan25-Apr-18 4:59 
QuestionObtaining a COM pointer in a C # ActiveX control inside an MFC ActiveX control Pin
SoulToMind20-Apr-18 20:48
SoulToMind20-Apr-18 20:48 
QuestionError when printing Pin
Erich Ruth20-Apr-18 5:51
Erich Ruth20-Apr-18 5:51 
Rant[REPOST] Error when printing Pin
Richard Deeming20-Apr-18 6:01
mveRichard Deeming20-Apr-18 6:01 
GeneralRe: [REPOST] Error when printing Pin
Victor Nijegorodov20-Apr-18 6:48
Victor Nijegorodov20-Apr-18 6:48 
QuestionRe: Error when printing Pin
David Crow20-Apr-18 6:12
David Crow20-Apr-18 6:12 
AnswerRe: Error when printing Pin
Erich Ruth20-Apr-18 7:49
Erich Ruth20-Apr-18 7:49 
AnswerRe: Error when printing Pin
Randor 20-Apr-18 20:26
professional Randor 20-Apr-18 20:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.