Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

RE: Connect C++ Iterating TextStyles

$
0
0

[quote user="Jesper Stahl Madsen"]Please tell what is wrong in the lines[/quote]

I don't understand why the compiler is complaining.

I suggest that you create an example that you can submit to Bentley Systems to illustrate the problem.

int MdlMain ()
{
  DgnFileP dgnObjP = mdlModelRef_getDgnFile (ACTIVEMODEL);
  TextStyleCollection coll (*dgnObjP);
  TextStyleIterator iter = coll.begin ();
  TextStyleIterator end = coll.end ();
  for (; iter != end; iter++)  // C2676?
  {
  }  

  TextStyleIterator iter2 = iter++;  // C2676?

  return 0;
}

Following Paul's comment below, does the following compile correctly for you?

int MdlMain ()
{
  DgnFileP dgnObjP = mdlModelRef_getDgnFile (ACTIVEMODEL);
  TextStyleCollection coll (*dgnObjP);
  TextStyleIterator iter = coll.begin ();
  TextStyleIterator end = coll.end ();
  //for (; iter != end; iter++)  // C2676?
  for (; iter != end; ++iter)
  {
  }  

  TextStyleIterator iter2 = ++iter;  

  return 0;
}

Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>