LinuxQuestions.org
Have you listened to LQ Radio?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Thread Tools
Old 05-21-2004, 01:45 AM   #1
vipinsharma
LQ Newbie
 
Registered: May 2004
Posts: 9
Thanked: 0
Stray at line number


[Log in to get rid of this advertisement]
Hello all,
while running a small programm to test the exception handling code i am facing a very peculiar problem.


whenever i disk clean and rebuild all and then execute there is no problem. But even if i make a small change( just add whitespace or newline) in it and do not repeat the procedure above.....then there is an error during compilation with the following message.........
.....
exception:1376: stray '\307' in program
exception:1389: stray '\307' in program
exception:1396: stray '\307' in program

...and so on in some 1000 lines
However if i try to run the same program through command prompt it again works fine. And in KDE if i donot include iostream then again problem is removed.

here is the scrap of source code

please help me in this regard ASAP.
Vipin Sharma

main source file======
/***************************
main.cpp - description
-------------------
***************/

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <iostream>
#include <stdlib.h>
#include <stdio.h>


#include "./Include/Throw.h"

using namespace std;

int main(int argc, char *argv[])
{
cout << "Hello, World!" << endl;
printf( "Hello, World!");

try{
Throw(1);
Throw(-2);
}
catch(int)
{
// cout<<" Got invalid Integer argument";
printf(" Got invalid Integer argument");
}
/* catch(...)
{
// cout<<" Got invalid but not integer argument";
printf(" Got invalid but not integer argument");
}*/

return EXIT_SUCCESS;
}


===================
header file

***************************************************************
Throw.h - description

***************************************************************************/
#ifndef THROW_HEADER
#define THROW_HEADER

void Throw(int Error);

#endif //THROW_HEADER

===========================
source file
/***************************************************************************
Throw.cpp - description
-------------------
***************************************************************************/
#include <iostream>
#include "../Include/Throw.h"

using namespace std;

void Throw(int Error)
{

try{
cout<<" Argument Passed : "<<Error;

if(Error<0)
{
throw Error;
}
else
{
cout <<" Argument is valid";
}

}
catch (int error)
{
cout<<"Argument is invalid(as less than 0)";
throw;
}
}



======================
vipinsharma is offline     Reply With Quote
Old 05-21-2004, 10:27 AM   #2
jim mcnamara
Member
 
Registered: May 2002
Posts: 964
Thanked: 0
I don't think this is a compiler problem. Try to fsck the filesystem.
One or more files are corrupted.
jim mcnamara is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
extracting line number s_shenbaga Linux - Newbie 1 10-21-2005 06:52 AM
problem line 26 stray ' so it says..... boxerboy Programming 3 09-03-2005 05:42 PM
number of emails over command line kvtournh Linux - Software 1 01-11-2005 09:52 AM
looking for a way to dump line number info jbreazeale Linux - Software 2 09-22-2004 01:02 PM
Printing a line number gummimann Programming 2 11-06-2003 07:09 AM


All times are GMT -5. The time now is 08:19 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration