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. please help me find the error guys, they said expected unqualified-id before '{' token at line 11, col 19..

please help me find the error guys, they said expected unqualified-id before '{' token at line 11, col 19..

Scheduled Pinned Locked Moved C / C++ / MFC
help
4 Posts 4 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.
  • S Offline
    S Offline
    Salsabilatikah Yunus
    wrote on last edited by
    #1

    #include
    #include
    using namespace std;

    float addition (float &a, float &b){
    float sum = a + b;
    b+=b;
    return sum;}

    float int{
    float x, y, c, d;{
    cout<<"Masukan nilai x : ";
    cin>>x;
    cout<<"Masukan nilai y : ";
    cin>>y;
    c = 6;
    d = 4;
    cout << "Nilai x sebelum memanggil fungsi addition = " << c << endl;
    cout << "Nilai y sebelum memanggil fungsi addition = " << d << endl;
    cout << "------------------------------------------- " <

    V K D 3 Replies Last reply
    0
    • S Salsabilatikah Yunus

      #include
      #include
      using namespace std;

      float addition (float &a, float &b){
      float sum = a + b;
      b+=b;
      return sum;}

      float int{
      float x, y, c, d;{
      cout<<"Masukan nilai x : ";
      cin>>x;
      cout<<"Masukan nilai y : ";
      cin>>y;
      c = 6;
      d = 4;
      cout << "Nilai x sebelum memanggil fungsi addition = " << c << endl;
      cout << "Nilai y sebelum memanggil fungsi addition = " << d << endl;
      cout << "------------------------------------------- " <

      V Offline
      V Offline
      Victor Nijegorodov
      wrote on last edited by
      #2

      Try to move all the '{' and '}' symbols to the new lines and properly format the resulting code...

      1 Reply Last reply
      0
      • S Salsabilatikah Yunus

        #include
        #include
        using namespace std;

        float addition (float &a, float &b){
        float sum = a + b;
        b+=b;
        return sum;}

        float int{
        float x, y, c, d;{
        cout<<"Masukan nilai x : ";
        cin>>x;
        cout<<"Masukan nilai y : ";
        cin>>y;
        c = 6;
        d = 4;
        cout << "Nilai x sebelum memanggil fungsi addition = " << c << endl;
        cout << "Nilai y sebelum memanggil fungsi addition = " << d << endl;
        cout << "------------------------------------------- " <

        K Offline
        K Offline
        k5054
        wrote on last edited by
        #3

        float int{

        Well, that's not going to work, now is it? Also, you have more opening braces "{" than closing braces "}".

        Keep Calm and Carry On

        1 Reply Last reply
        0
        • S Salsabilatikah Yunus

          #include
          #include
          using namespace std;

          float addition (float &a, float &b){
          float sum = a + b;
          b+=b;
          return sum;}

          float int{
          float x, y, c, d;{
          cout<<"Masukan nilai x : ";
          cin>>x;
          cout<<"Masukan nilai y : ";
          cin>>y;
          c = 6;
          d = 4;
          cout << "Nilai x sebelum memanggil fungsi addition = " << c << endl;
          cout << "Nilai y sebelum memanggil fungsi addition = " << d << endl;
          cout << "------------------------------------------- " <

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          Where's main()?

          "One man's wage rise is another man's price increase." - Harold Wilson

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

          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