Short answer: yes, you'll need to use some tricks with #define to do what you want; values set in an enum aren't recognised by the preprocessor.
An enum is interpreted by the compiler and not the preprocessor. The statement is ignored by the preprocessor and thus something like PIN_A is not any more meaningful, as far as the preprocessor is concerned, in the later code than j would be from a statement like:
helo i have asked in exam what that what is the base type of
enum
options are given bewlo
(1) long int
(2) short int
(3) signed int
(4) unsigned int
can u tell me what is the exact answer from the above option
Regards,
Amit (1 Reply)
Hi Guys,
This is really really urgent. Am looking out for some quick answers.
I'm developing a DNS Resolver client that interprets DNS Query repsonses & pass on the needful to DNS applications.
When an ENUM query(modified to an nslookup naptr query) is issued & an NAPTR RR(Resource Record)... (1 Reply)
Hi,
Anyone please explain the functionality of ## in c.
I didn't get the following preprocessor directives,
# define LL(x) x ## LL
# define LL(x) x ## i64
Thanks,
Naga:cool: (1 Reply)
Hi,
Just wondering if it is possible to trim the file path output by __FILE__ preprocessor in my debugging line.
Let's say my main.cpp file is found in C:\User\MyName\SystemA\Mod1\SubMod2\Test\main.cpp
for __FILE__, I just want the filename - main.cpp to be printed, instead of the entire... (2 Replies)
I am trying to implement a spare array in C that would be referenced by regular integers.
Right away: define array for maximum possible index elements completely is not what I trying to get!!!
It should be a construction that would have just 2 elements if I need to have just two indexes, like... (8 Replies)
Hi All,
I came across this error "MIXING ENUM TYPES" when I run my C program against the Coverity Tool. I've made many search relating to the error, but I didnt find the exact solution. Can anyone help me to overcome this.?
Thanks in Advance.!! (3 Replies)
I am currently using Linux CentOS and programming in FORTRAN 90 using Portland 7.1 compiler.
I am able to set in the preprocessor directives a flag called TEST. when I go to use logic in my code i can write
#ifdef TEST
execute something
#endif
Furthermore, if I want to negate the... (2 Replies)
Discussion started by: prodigious8
2 Replies
LEARN ABOUT DEBIAN
uthash-dev
UTHASH-DEV(3) uthash-dev User Manual UTHASH-DEV(3)NAME
uthash-dev - Hash map and linked list implementation
SYNOPSIS
#include <uthash.h>
#include <utlist.h>
#include <utarray.h>
#include <utstring.h>
DESCRIPTION
The uthash-dev Debian package build from the uthash source package contains the uthash, utlist, utharray, and utstring headers. They can be
included in any C source code and provide a hash map, linked list, etc implementations as C preprocessor macros.
The documentation is available in the documentation directory of the package (/usr/share/doc/uthash-dev/) in HTML and PDF format.
Additionally, some examples are also included that have been provided as test cases in the upstream release.
FILES
/usr/include/uthash.h
The hash map implementation as C preprocessor macro.
/usr/include/utlist.h
The linked list implementation as C preprocessor macro.
/usr/include/utarray.h
The dynamic array implementation as C preprocessor macro.
/usr/include/utstring.h
The dynamic string implementation as C preprocessor macro.
AUTHOR
Bastian Blywis <blywis@zedat.fu-berlin.de>
Wrote this manpage for the Debian system.
COPYRIGHT
Copyright (C) 2009 Bastian Blywis
This manual page was written for the Debian system (and may be used by others).
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or (at
your option) any later version published by the Free Software Foundation.
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
uthash-dev 03/11/2012 UTHASH-DEV(3)