Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. Read from memory
Forum Updated to NodeBB v4.3 + New Features

Read from memory

Scheduled Pinned Locked Moved C++ Gurus
2 Posts 2 Posters 1.1k 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.
  • P Offline
    P Offline
    pushpa416
    wrote on last edited by
    #1

    Hi all,

    I got a quick question, i am reading a txt file line by line and comparing the values like following

    @ QFile file("read.txt");
    if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
    return;
    int data,min[5],max[5];
    int row,column;
    float result1[5],cotdr_out[5];
    for (row = 0; row < 4; row++){
    QByteArray line = file.readLine();
    QList<QByteArray> numbers = line.split(',');
    for (column = 0; column < (numbers.size() - 1); column++) {
    data = numbers[column].toInt();
    if (data > max[column])
    max[column] = data;
    }
    }@
    Now my Question is, instead of reading from a txt file, I need to read from memory, how can i proceed further.
    what i need to do instead of QFile file read..

    an example would be good

    Thanks

    qxoz: for future, please enclose your code in "@" for syntax highlighting

    1 Reply Last reply
    0
    • J Offline
      J Offline
      junnellogbox.ph
      wrote on last edited by
      #2

      "This thread sir may help you":http://qt-project.org/forums/viewthread/7190

      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