Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. string

string

Scheduled Pinned Locked Moved Managed C++/CLI
questionhelptutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nyquisttt
    wrote on last edited by
    #1

    It may be simple question but i need an urgent help. I have to use some image sequence as the input to my code. for example: image001.bmp image002.bmp image003.bmp .... and so on. But there are 200 images and i have to use a function to read these images. How can i name a string in a for loop as I wanted? for(int i=0;i<200;i++) { nextImageName = image(i).bmp ..... } I want the code to increase the string name as if it is a number. Could you please help me?

    R 1 Reply Last reply
    0
    • N nyquisttt

      It may be simple question but i need an urgent help. I have to use some image sequence as the input to my code. for example: image001.bmp image002.bmp image003.bmp .... and so on. But there are 200 images and i have to use a function to read these images. How can i name a string in a for loop as I wanted? for(int i=0;i<200;i++) { nextImageName = image(i).bmp ..... } I want the code to increase the string name as if it is a number. Could you please help me?

      R Offline
      R Offline
      Ravi Bhavnani
      wrote on last edited by
      #2

      CString strFilename;
      int nTotalImages = 200;
      for (int nIndex=1; (nIndex <= nTotalImages); nIndex++) {
      strFilename.Format ("image%03d.bmp", nIndex);
      ...
      }

      /ravi My new year's resolution: 2048 x 1536 Home | Articles | Freeware | Music ravib@ravib.com

      N 1 Reply Last reply
      0
      • R Ravi Bhavnani

        CString strFilename;
        int nTotalImages = 200;
        for (int nIndex=1; (nIndex <= nTotalImages); nIndex++) {
        strFilename.Format ("image%03d.bmp", nIndex);
        ...
        }

        /ravi My new year's resolution: 2048 x 1536 Home | Articles | Freeware | Music ravib@ravib.com

        N Offline
        N Offline
        Ni m
        wrote on last edited by
        #3

        u can use aray of CString : CStringArray bitmaps; CString temp; while(EOF) { temp.format("image%03d.bmp", nIndex); bitmaps.Add(temp); }

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups