Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Replace an Object name with a String???
Forum Updated to NodeBB v4.3 + New Features

Replace an Object name with a String???

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 507 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.
  • S Offline
    S Offline
    suggi87
    wrote on last edited by
    #1

    Hello,

    I have a function with one integer parameter.

    If it gets a 1: -> auto1 (String auto + parameter 1)
    if it gets a 2: -> auto2 (String auto + parameter 2)
    ...

    and i want to replace following object in this line with this string, to make this function dynamic

    @std::string s1 = this->auto1->getname();@

    In this exmple auto1 is the object-name.

    Can i replace it with my string?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved