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. [Solved]error: expected initializer before '}' token

[Solved]error: expected initializer before '}' token

Scheduled Pinned Locked Moved C++ Gurus
4 Posts 3 Posters 7.1k Views
  • 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.
  • J Offline
    J Offline
    jonesy29847
    wrote on 18 Sept 2013, 02:01 last edited by
    #1

    Hello again,please.
    How do I find error codes or some way to reference specific errors.

    Thanks again
    @#include <QtGui>
    #include "obdii.h"

    obdiiDlg::obdiiDlg(QWidget *parent)
    :QDialog(parent)
    {
    lblMessage = new QLabel(tr("Message"));

    lblPIDData = new QLabel(tr("PID data"));
    treePIDData = new QTreeWidget;
    lblPIDData->setBuddy(treePIDData);
    
    connect(btnGetDTC, SIGNAL(clicked()), this, SLOT(btnGetDTCClicked()));
    
    QVBoxLayout *leftLayout = new QVBoxLayout;
    leftLayout->addWidget(lblPIDData);
    leftLayout->addWidget(treePIDData);
    
    QHBoxLayout *mainLayout = new QHBoxLayout;
    mainLayout->addLayout(leftLayout);
    
    setLayout(mainLayout);
    setWindowTitle("OBDII");
    setLayout(mainLayout);
    
    void tbnGetDTCClicked()
    

    // void btnGetPIDDataClicked()
    // void btnClearMILClicked()
    // void btnGoOnlineClicked()
    // void btnSendDataClicked()
    // void btnPrintClicked()
    }

    void btnGetDTCClicked()
    {
    for (int i =0; i < 1000; i++);
    }

    @

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 18 Sept 2013, 07:44 last edited by
      #2

      Hi,

      Line 26 to 32 are suspicious. It looks like are declaring the function (so they should not be there) and the lines are missing semi-colon.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jonesy29847
        wrote on 19 Sept 2013, 03:22 last edited by
        #3

        mWahahaha!

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Shanial65
          Banned
          wrote on 19 Jul 2018, 05:21 last edited by
          #4
          This post is deleted!
          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