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. C / C++ / MFC
  4. Calculated values from different functions to a single function.

Calculated values from different functions to a single function.

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
22 Posts 7 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.
  • C CodingLover

    It's true pal. But if I change my code now it can be a real mess for me. Because I have to change lots of coding parts in my code.

    I appreciate your help all the time... Eranga :)

    N Offline
    N Offline
    Nelek
    wrote on last edited by
    #21

    Declare the variables at the header, initialize them in the constructor and use "search and replace" to change the names is a lot of work? What do u prefer? Do that "lot" of work now? Or having scope/access problems in every thing you code afterwards?

    Greetings. -------- M.D.V. If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you “The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson ;)

    C 1 Reply Last reply
    0
    • N Nelek

      Declare the variables at the header, initialize them in the constructor and use "search and replace" to change the names is a lot of work? What do u prefer? Do that "lot" of work now? Or having scope/access problems in every thing you code afterwards?

      Greetings. -------- M.D.V. If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you “The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson ;)

      C Offline
      C Offline
      CodingLover
      wrote on last edited by
      #22

      Now actually I have no idea what to do... :| Here is a one function I've used. void CSRFDBDlg::GetMess(int length, char * buffer, ADODB::_RecordsetPtr pRecSet) { UpdateData(TRUE); _variant_t vtData; // VARIANT data type long nRetLength = 0; // Dummy value _variant_t vAppendChunck = BinaryToVariant((BYTE*)buffer, length, nRetLength); pRecSet->Fields->GetItem("Bio_Data")->AppendChunk(vAppendChunck); vtData.vt = VT_I2; vtData.iVal = (int)nRetLength; pRecSet->Fields->GetItem("Bio_Size")->PutValue(vtData); } Here I have two values to store in the database.

      I appreciate your help all the time... Eranga :)

      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