linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ratheesh kannoth <ratheesh.ksz@gmail.com>
To: "Steve Graegert (スティーブ)" <graegerts@gmail.com>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: c++ code - not getting compiled !!!!!!!!!
Date: Fri, 29 Jul 2011 11:56:07 +0530	[thread overview]
Message-ID: <CAGZFCEGO2JipOu=MeHTjau1ocXa_r483bfL5ViBiXmhAT3m1hw@mail.gmail.com> (raw)
In-Reply-To: <CALC0UT=JhhuEc2MNL9_PrhtgkF5eAqNgB8vtQ5ZK09DF8S8edA@mail.gmail.com>

g++ 2.cpp
2.cpp: In function 'int main()':
2.cpp:21: error: jump to label 'Sri'
2.cpp:13: error:   from here
2.cpp:15: error:   crosses initialization of 'int j'





2011/7/29 Steve Graegert (スティーブ) <graegerts@gmail.com>:
> Is it too much to ask for the actual error returned by the compiler?
>
>
> On Fri, Jul 29, 2011 at 08:01, ratheesh kannoth <ratheesh.ksz@gmail.com> wrote:
>> #include <iostream>
>>
>> using namespace std;
>>
>> int main()
>> {
>>    int i;
>>
>>    cout << "Enter value of i " << endl;
>>    cin >> i;
>>
>>    if (i < 5)
>>        goto Sri;
>>
>>    int j = 6;
>>    cout << "j = " << j << endl;
>>
>>    cout << "Outside Sri" << endl;
>>    return 0;
>>
>> Sri:
>>    cout << "Inside Sri" << endl;
>>    return 0;
>> }
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>

  parent reply	other threads:[~2011-07-29  6:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-29  6:01 c++ code - not getting compiled !!!!!!!!! ratheesh kannoth
     [not found] ` <CALC0UT=JhhuEc2MNL9_PrhtgkF5eAqNgB8vtQ5ZK09DF8S8edA@mail.gmail.com>
2011-07-29  6:26   ` ratheesh kannoth [this message]
2011-07-29  6:44     ` Srinivasa T N
2011-07-29  6:26 ` Srinivasa T N
2011-07-29  6:40 ` Steve Graegert (スティーブ)
2011-07-29  6:55   ` ratheesh kannoth
2011-07-29  7:00     ` Srinivasa T N
2011-07-29  6:51 ` vipul kumar samar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGZFCEGO2JipOu=MeHTjau1ocXa_r483bfL5ViBiXmhAT3m1hw@mail.gmail.com' \
    --to=ratheesh.ksz@gmail.com \
    --cc=graegerts@gmail.com \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).