LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 11-24-2010, 11:47 AM   #1
landonmkelsey
Member
 
Registered: Jul 2001
Location: Texas
Distribution: Fedora 16
Posts: 323

Rep: Reputation: 36
Eclipse-CDT allows C/C++


http://www.eclipse.org/forums/index....682c233649f2e9

In the past, I have gotten Eclipse/CDT to work twice.

Anybody having Eclipse/CDT problems?
 
Old 11-24-2010, 12:24 PM   #2
landonmkelsey
Member
 
Registered: Jul 2001
Location: Texas
Distribution: Fedora 16
Posts: 323

Original Poster
Rep: Reputation: 36
here is the code and error:

#include <iostream>
using namespace std;
#include <stdlib.h>
template <class T>
bool checkLim(const T& val, const T& limit)
{
return val>limit;
}
template <class T>
class CheckLimit
{
T limit;
public:
CheckLimit(const T& _limit):limit(_limit)
{
}
bool operator() (const T& value)
{
// return value<limit;
return checkLim<T>(value,limit);
}
};
int main (int argc, char** argv)
{
int limit = atoi(argv[1]);
cout<<limit<<endl;
CheckLimit<int> check_limit(100);
if(check_limit(limit))
{
cout<<"too little"<<endl;
}
else
cout<<"too big"<<endl;
return 0;
}


error:**** Build of configuration Debug for project checklimit ****

make all
Building target: checklimit
Invoking: GCC C++ Linker
g++ -o"checklimit" ./checkLimit.o
./checkLimit.o: file not recognized: File truncated
collect2: ld returned 1 exit status
make: *** [checklimit] Error 1
 
  


Reply

Tags
eclipse


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Metrics plug-in for Eclipse, does it support Eclipse CDT? like2learn Programming 1 09-19-2010 02:22 PM
Eclipse CDT mlpa Slackware 4 09-13-2010 10:20 AM
eclipse CDT issue oakhill Programming 2 12-16-2009 11:31 AM
Eclipse : installing CDT vmelkon Ubuntu 1 08-02-2007 10:01 PM
Eclipse CDT for Amd64??? ssobeht Programming 4 02-07-2005 06:33 AM


All times are GMT -5. The time now is 06:40 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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration