Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22460

#include causes errors

$
0
0

I'm trying to use GetTickCount() from the windows.h header file. Right now my code looks like this:

#include <stdio.h>
#include <string.h>
#include "declarations.h"
#define INPUTBUFFER 400 * 6
#define START_POS "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
#include <windows.h>

void interface() {
.....
.....
}

The compiler returns 2 errors:

  1. Expected '{' before '(' token (pointing to the '(' after "interface"
  2. 2 or more data types in declaration specifiers (pointing to "interface")

When I comment out #include < windows.h >, the interface function works just fine. I don't even have GetTickCount() in my code yet. I checked the gcc path to make sure windows.h is there, so I'm not sure why I'm getting this error.


Viewing all articles
Browse latest Browse all 22460

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>