<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/write-and-read-from-a-global-vector-variable/m-p/328735#M42088</link>
    <description>Use %d for integers.&lt;BR /&gt;
&lt;BR /&gt;
"Jeroen Henckaerts" &lt;JEROEN.HENCKAERTS&gt; wrote in&lt;BR /&gt;
message news:A66D0CFC8FD13EDA1BCE9DFA1EAA01C3@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; Byron Blattel &lt;SPAM&gt; wrote in news:CFN373165356287963&lt;BR /&gt;
&amp;gt; @discussion.autodesk.com:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&amp;gt;  acutPrintf("\nNumber of objects so far: %s", MyContainer.size());&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; acutPrintf() is looking for a string '%s' &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; (EDITED).. silly me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&amp;gt; but how can I actually solve this??&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; --&lt;BR /&gt;
&amp;gt; hold your light, Eleven&lt;/SPAM&gt;&lt;/JEROEN.HENCKAERTS&gt;</description>
    <pubDate>Fri, 01 Mar 2002 13:22:00 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2002-03-01T13:22:00Z</dc:date>
    <item>
      <title>write and read from a global vector variable</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/write-and-read-from-a-global-vector-variable/m-p/328731#M42084</link>
      <description>hello,&lt;BR /&gt;
&lt;BR /&gt;
I declared a global vector variable, and it looks like writing to the &lt;BR /&gt;
vector is never a problem, but reading is sometimes...&lt;BR /&gt;
&lt;BR /&gt;
I got a class MyClass. The objects of that class are put in a vector: &lt;BR /&gt;
vector&lt;MYCLASS&gt; MyContainer. (global variable, is cleared at the &lt;BR /&gt;
beginning of the program by MyContainer.clear())&lt;BR /&gt;
&lt;BR /&gt;
When I want to put an object in the class, this is no problem, but when I &lt;BR /&gt;
read back from the container, something goes wrong.&lt;BR /&gt;
&lt;BR /&gt;
void Import()&lt;BR /&gt;
{&lt;BR /&gt;
    	// ... get the parameters needed for the new object...&lt;BR /&gt;
&lt;BR /&gt;
    	MyClass NewObject(/*..parameters..*/);&lt;BR /&gt;
    	MyContainer.push_back(NewObject);&lt;BR /&gt;
&lt;BR /&gt;
    	int Number = MyContainer.size() - 1; &lt;BR /&gt;
    	    	// the number of the element just added&lt;BR /&gt;
&lt;BR /&gt;
    	// ... some other operations on the object in the container&lt;BR /&gt;
&lt;BR /&gt;
    	acutPrintf("\nObject Name: %s", MyContainer[Number].GetName());&lt;BR /&gt;
    	    	// prints the name to the Autocad command line&lt;BR /&gt;
    	    	// this line doesn't cause any problem.&lt;BR /&gt;
&lt;BR /&gt;
//   	acutPrintf("\nNumber of objects so far: %s", MyContainer.size());&lt;BR /&gt;
    	    	// at this line, the program crashes... &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;
    	    	// if I skip this line, the program continues&lt;BR /&gt;
&lt;BR /&gt;
    	for (int i=0; i&lt;MYCONTAINER.SIZE&gt;
    	    	acutPrintf("\n\t%s", MyContainer&lt;I&gt;.GetName());&lt;BR /&gt;
    	    	// this line doesn't cause any problem either....&lt;BR /&gt;
&lt;BR /&gt;
    	return;&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
It's very strange that at first, it works to enter the container, and &lt;BR /&gt;
suddenly not anymore...&lt;BR /&gt;
The errormessage that appears when the program crashes is always &lt;BR /&gt;
something like this:  "FATAL ERROR: Unhandled access violation reading &lt;BR /&gt;
0x4d64696a Exception at 481d55h". &lt;BR /&gt;
I think it has something to do with the memory use, but I cannot find the &lt;BR /&gt;
problem... :(:(&lt;BR /&gt;
&lt;BR /&gt;
Does anyone know what can be wrong? &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks a lot!&lt;BR /&gt;
&lt;BR /&gt;
jeroen&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
hold your light, Eleven&lt;/I&gt;&lt;/MYCONTAINER.SIZE&gt;&lt;/MYCLASS&gt;</description>
      <pubDate>Fri, 01 Mar 2002 09:13:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/write-and-read-from-a-global-vector-variable/m-p/328731#M42084</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-03-01T09:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: write and read from a global vector variable</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/write-and-read-from-a-global-vector-variable/m-p/328732#M42085</link>
      <description>&amp;gt;  acutPrintf("\nNumber of objects so far: %s", MyContainer.size());&lt;BR /&gt;
&lt;BR /&gt;
acutPrintf() is looking for a string '%s' &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
--&lt;BR /&gt;
    |&lt;BR /&gt;
----+----------------------------------------------&lt;BR /&gt;
    |  Byron Blattel&lt;BR /&gt;
    |  CADwerx---Applications for AutoCAD&lt;BR /&gt;
    |  Autodesk Registered Developer&lt;BR /&gt;
    |  email: byron@cadwerx.net&lt;BR /&gt;
    |  web site: http://www.cadwerx.net&lt;BR /&gt;
    |</description>
      <pubDate>Fri, 01 Mar 2002 10:51:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/write-and-read-from-a-global-vector-variable/m-p/328732#M42085</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-03-01T10:51:18Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/write-and-read-from-a-global-vector-variable/m-p/328733#M42086</link>
      <description>Byron Blattel &lt;SPAM&gt; wrote in news:CFN373165356287963&lt;BR /&gt;
@discussion.autodesk.com:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;&amp;gt;  acutPrintf("\nNumber of objects so far: %s", MyContainer.size());&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; acutPrintf() is looking for a string '%s' &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
(EDITED)... silly me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
but how can I actually solve this?? &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
hold your light, Eleven&lt;/SPAM&gt;</description>
      <pubDate>Fri, 01 Mar 2002 13:03:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/write-and-read-from-a-global-vector-variable/m-p/328733#M42086</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-03-01T13:03:21Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/write-and-read-from-a-global-vector-variable/m-p/328734#M42087</link>
      <description>Byron Blattel &lt;SPAM&gt; wrote in news:CFN373165356287963&lt;BR /&gt;
@discussion.autodesk.com:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;&amp;gt;  acutPrintf("\nNumber of objects so far: %s", MyContainer.size());&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; acutPrintf() is looking for a string '%s' &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
(EDITED)....silly me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
thanx!&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
hold your light, Eleven&lt;/SPAM&gt;</description>
      <pubDate>Fri, 01 Mar 2002 13:07:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/write-and-read-from-a-global-vector-variable/m-p/328734#M42087</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-03-01T13:07:26Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/write-and-read-from-a-global-vector-variable/m-p/328735#M42088</link>
      <description>Use %d for integers.&lt;BR /&gt;
&lt;BR /&gt;
"Jeroen Henckaerts" &lt;JEROEN.HENCKAERTS&gt; wrote in&lt;BR /&gt;
message news:A66D0CFC8FD13EDA1BCE9DFA1EAA01C3@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; Byron Blattel &lt;SPAM&gt; wrote in news:CFN373165356287963&lt;BR /&gt;
&amp;gt; @discussion.autodesk.com:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&amp;gt;  acutPrintf("\nNumber of objects so far: %s", MyContainer.size());&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; acutPrintf() is looking for a string '%s' &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; (EDITED).. silly me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&amp;gt; but how can I actually solve this??&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; --&lt;BR /&gt;
&amp;gt; hold your light, Eleven&lt;/SPAM&gt;&lt;/JEROEN.HENCKAERTS&gt;</description>
      <pubDate>Fri, 01 Mar 2002 13:22:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/write-and-read-from-a-global-vector-variable/m-p/328735#M42088</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-03-01T13:22:00Z</dc:date>
    </item>
  </channel>
</rss>

