473,405 Members | 2,167 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,405 software developers and data experts.

error: 'something' does not name a type

Hi,
I have a struct with this definition
Expand|Select|Wrap|Line Numbers
  1. struct SeverityAction : public Action {
  2.     uint32_t theSeverity;      //*****
  3.   public:
  4.     SeverityAction(uint32_t aSeverity);
  5. ...
  6. };
  7.  
and the uint32_t is defined in "/usr/include/stdint.h"
Expand|Select|Wrap|Line Numbers
  1. /* Unsigned.  */
  2. typedef unsigned char        uint8_t;
  3. typedef unsigned short int    uint16_t;
  4. #ifndef __uint32_t_defined
  5. typedef unsigned int        uint32_t;
  6. # define __uint32_t_defined
  7. #endif
  8. #if __WORDSIZE == 64
  9. typedef unsigned long int    uint64_t;
  10. #else
  11. __extension__
  12. typedef unsigned long long int    uint64_t;
  13. #endif
However I get this error:
Expand|Select|Wrap|Line Numbers
  1. error: ‘uint32_t’ does not name a type
  2. error: expected ‘)’ before ‘aSeverity’
How can I fix that?
Mar 29 '11 #1

✓ answered by Banfa

uint32_t might be defined in "/usr/include/stdint.h" but have you included it in a relevant place?

3 18186
Banfa
9,065 Expert Mod 8TB
uint32_t might be defined in "/usr/include/stdint.h" but have you included it in a relevant place?
Mar 29 '11 #2
You are right. that file was included in another file but previous versions of gcc didn't complain about that.

thanks :)
Mar 29 '11 #3
Banfa
9,065 Expert Mod 8TB
If you need a header you should include it.

You should not assume that just because it is included into another header that you include that in future versions that other header will continue to include the header you need.
Mar 29 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Liam3 | last post by:
I'm having a problem with a table that accidently had a column added whose type is the same as the table. This is seriously creating a problem as I cannot delete the table and I really don't have...
0
by: Danny Pressley | last post by:
I have a VS.NET 2003 Visual C++ MFC Application Project in which I added a new resource file, I then added an icon to this new resource file and did a rebuild and got the following error: "fatal...
11
by: Danny Pressley | last post by:
I have a VS.NET 2003 Visual C++ MFC Application Project in which I added a new resource file, I then added an icon to this new resource file and did a rebuild and got the following error: "fatal...
3
by: selena | last post by:
I have created 2 ASP pages that gives users the option of switching back and forth between French and English. They click on the word English and it converted the text to English and the French...
7
by: Együd Csaba | last post by:
Hi, I've a problem with some of my stored procs. My config is: RH7.1, Postgres 7.3.2 I had converted a few fields of a few tables from one type to another and after this I made all the...
4
by: Ondrej Spanel | last post by:
The code below does not compile with .NET 2003, I get folowing error: w:\c\Pokusy\delegTemplArg\delegTemplArg.cpp(11) : error C2993: 'float' : illegal type for non-type template parameter 'x' ...
1
by: dotNetDave | last post by:
I keep getting the following error on one of my web service pages: Parser Error Parser Error Message: Could not create type 'SyPixx.Web.ClearService.ConfigureAlarms'. Source Error: Line 1: ...
0
by: WebDev2 | last post by:
I can't get AJAX.NET Pro to work. I keep getting a Compiler Error Message: CS0246: The type or namespace name 'AjaxPro' could not be found (are you missing a using directive or an assembly...
2
by: paul.dunstone | last post by:
HI all I am using msbuild to compile my web application project. After building the solution I get the following error message: Server Error in '/Community' Application....
4
by: infinetinc | last post by:
I'm receiving the following error when this site is published to the production environment: Compiler Error Message: CS0246: The type or namespace name 'GridViewHelper' could not be found (are you...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.