473,382 Members | 1,147 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

types

Hello

this error:

src\Terrain\TerrainManager.cpp:47: error: `pthread_t' does not name a type

was declared like:

static int pthread_t;// threadQGT; ///< QGT maintenance
thread
static int pthread_rwlock_t;// rwlockQgtBusy; ///< RW lock for qgtBusy
list

and defined:

pthread_t CTerrainManager::threadQGT;

What is going on here? I cant find any threadQGT...

Thanks

Michael


Aug 6 '06 #1
2 3760
Michael Sgier wrote:
Hello

this error:

src\Terrain\TerrainManager.cpp:47: error: `pthread_t' does not name a type
>
What is going on here? I cant find any threadQGT...
The real issue is that you've not included a declaration of
pthread_t. You're missing an include file somewhere (which
is not a standard C++ thing).
>
Aug 6 '06 #2

"Michael Sgier" <sg***@nospam.chwrote in message
news:39***************************@news.hispeed.ch ...
Hello

this error:

src\Terrain\TerrainManager.cpp:47: error: `pthread_t' does not name a type
This is true of the code below.
>
was declared like:

static int pthread_t;// threadQGT; ///< QGT maintenance
This defines a type 'int' object whose identifier
is 'pthread_t'. I.e. the object's name (not it's
type) is 'pthread_t'.
thread
static int pthread_rwlock_t;// rwlockQgtBusy; ///< RW lock for qgtBusy
list

and defined:

pthread_t CTerrainManager::threadQGT;

What is going on here? I cant find any threadQGT...
You're trying to use an identifier as a type. This is
like writing:

int i; // define type 'int' object named 'i'

i j; // define a type 'i' object named 'j'.

It just makes no sense.

-Mike
Aug 6 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: John Dibling | last post by:
Could somebody please direct me to a location in the standard where POD types are defined? That is, where in the standard is it defined what attributes a POD type has that a non-POD hasn't? Also,...
5
by: Andy Skypeck | last post by:
I am looking for some validation against a dubious coding practice that prevails where I work. C types defined in types.h (Linux) or stdint.h (Windows, C99?) are used as if they belong to the C++...
8
by: Shailesh | last post by:
One problem I've been wrestling with for a long time is how to use the C++ integral data types, vis-a-vis their size. The C++ rules guarantee that a char is at least 1 bytes, a short and int at...
188
by: infobahn | last post by:
printf("%p\n", (void *)0); /* UB, or not? Please explain your answer. */
5
by: Zach | last post by:
When it is being said that, "value types are created on the stack or inline as part of an object". If a value type is created in an object, and that object is being called, the value type in that...
58
by: jacob navia | last post by:
Hi people I have been working again in my tutorial, and I have finished the "types" chapter. If you feel like "jacob bashing" this is the occasion! I am asking for criticisms, or for things I may...
14
by: Lane Straatman | last post by:
I would like to write a 'struct'. I have a library that is all but completely inappropriate for this task. So I'm looking for C code that fills in the gaps between: #undef...
159
by: Bob Timpkinson | last post by:
Hi, I have a 32-bit machine... Is there anyway I can get gcc to use the following integer sizes? char: 8 bits short: 16 bits int: 32 bits long: 64 bits long long: 128 bits
3
by: sophia.agnes | last post by:
Dear all, what are the major expression types in c? i have seen the following types of expressions 1) constant expressions 2) integral expressions 3) float expressions 4) pointer...
55
by: tonytech08 | last post by:
How valuable is it that class objects behave like built-in types? I appears that the whole "constructor doesn't return a value because they are called by the compiler" thing is to enable...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.