<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Declar Classes in Header files in C++</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21148/declar-classes-in-header-files-in-c</link><description>Hi, 
 This may be stupid, but I can&amp;#39;t declare classes in my .h file in keil. I have arduino library for my I2C device, but keil; does not recognize when I declare classes. 
 
 Thanks.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 05 Apr 2017 20:10:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21148/declar-classes-in-header-files-in-c" /><item><title>RE: Declar Classes in Header files in C++</title><link>https://devzone.nordicsemi.com/thread/82748?ContentTypeID=1</link><pubDate>Wed, 05 Apr 2017 20:10:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:131f3b4d-c161-4481-8758-dc07d1c5983a</guid><dc:creator>Keton</dc:creator><description>&lt;p&gt;Nordic SDK is written in C99 not C++. Keil has &lt;a href="http://www.keil.com/forum/18850/"&gt;problems&lt;/a&gt; with mixing C99 and C++ code and so far the only solution I&amp;#39;ve found is to set c99/c++ compilation manually in options for each file separately. That said there are problems to use Nordic SDK calls in c++ code because it heavily uses extended struct initializers &lt;code&gt;struct foo_s foo={. bar=baz};&lt;/code&gt;which are not implemented in ARM C++ compiler and g++.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>