Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Any small program in c++ compilable with gnu gpp compiler

Reply
Thread Tools

Any small program in c++ compilable with gnu gpp compiler

 
 
Robert Bralic
Guest
Posts: n/a
 
      07-18-2004
Hi,

Can anybody send to me aby small c++ program that is
compilable vith gpp under Linux ,that I can belive that C++
realy exists ,(1000-2000) lines program source.


http://www.velocityreviews.com/forums/(E-Mail Removed)


 
Reply With Quote
 
 
 
 
Alf P. Steinbach
Guest
Posts: n/a
 
      07-18-2004
* Robert Bralic:
>
> Can anybody send to me aby small c++ program that is
> compilable vith gpp under Linux ,that I can belive that C++
> realy exists ,(1000-2000) lines program source.


#include <iostream>
int main()
{
for( unsigned i = 0; i < 10000; ++i )
{
std::cout << "Do my assignment for me" << std::endl;
}
}

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
 
Reply With Quote
 
 
 
 
sk6307
Guest
Posts: n/a
 
      07-19-2004
Robert Bralic wrote:
> Hi,
>
> Can anybody send to me aby small c++ program that is
> compilable vith gpp under Linux ,that I can belive that C++
> realy exists ,(1000-2000) lines program source.
>
>
> (E-Mail Removed)
>
>


No problem, here you go:

#include <iostream>
using namespace std;
#define s string
#define i int
#define v void
#define c cout
#define in inline
#define t template
#define S(num, s) t<>struct pre<true, num>{static v print(){c<<s;}};
#define O(ones, s) t<>in v p<ones>(){c<<s;}
#define T(tens, s) t<>in v print_tens<tens>(){c<<s;}
t<bool small,i I>struct pre;t<i ones>in v p();t<i tens>in v
print_tens();S(0,"No")S(1,"One")S(2,"Two")S(3,"Thr ee")S(4,"Four")
S(5,"Five")S(6,"Six")S(7,"Seven")S(8,"Eight")S(9," Nine")S(10,"Ten")
S(11,"Eleven")S(12,"Twelve")S(13,"Thirteen")S(14," Fourteen")S(15,
"Fifteen")S(16,"Sixteen")S(17,"Seventeen")S(18,"Ei ghteen")S(19,
"Nineteen")O(0," ")O(1," one")O(2," two")O(3," three")O(4," four")
O(5," five")O(6," six")O(7," seven")O(8," eight")O(9," nine")T(2,
"Twenty")T(3,"Thirty")T(4,"Forty")T(5,"Fifty")T(6, "Sixty")T(7,
"Seventy")T(8,"Eighty")T(9,"Ninety")t<i I>struct pre<false,I>{
static v print(){print_tens<(I-I%10)/10>();p<(I%10)>();}};t<i I>
v pr(){pre<(I<20),I>:rint();} t<i I>in v B(){pr<I>();c<<" bottles \
of beer";}t<>in v B<1>(){pr<1>();c<<" bottle of beer";}t<i I>in
v Bo(){B<I>();c << " on the wall";}t<i I>in v stanza(){Bo<I>();c<<
",\n";B<I>();c<<",\n";}t<i I>in v bridge(){c<<"Take one down, pass \
it around,"<<endl;Bo<I-1>();c<<",\n";}t<>in v bridge<0>(){c<<"Go to \
the store and buy some more,"<<endl;Bo<99>();}t<i I>in v verse(){
stanza<I>();bridge<I>();}t<i I>in v sing(){verse<I>();c<<endl;sing<I
-1>();}t<>in v sing<0>(){verse<0>();}i main(){sing<99>();}

I hope it helps

sk
 
Reply With Quote
 
Robert Bralic
Guest
Posts: n/a
 
      07-19-2004

sk6307 <(E-Mail Removed)> wrote in message
news:cdf6ri$kks$(E-Mail Removed)...
> Robert Bralic wrote:
> > Hi,
> >
> > Can anybody send to me aby small c++ program that is
> > compilable vith gpp under Linux ,that I can belive that C++
> > realy exists ,(1000-2000) lines program source.
> >
> >
> > (E-Mail Removed)
> >
> >

>
> No problem, here you go:
>
> #include <iostream>
> using namespace std;
> #define s string
> #define i int
> #define v void
> #define c cout
> #define in inline
> #define t template
> #define S(num, s) t<>struct pre<true, num>{static v print(){c<<s;}};
> #define O(ones, s) t<>in v p<ones>(){c<<s;}
> #define T(tens, s) t<>in v print_tens<tens>(){c<<s;}
> t<bool small,i I>struct pre;t<i ones>in v p();t<i tens>in v
> print_tens();S(0,"No")S(1,"One")S(2,"Two")S(3,"Thr ee")S(4,"Four")
> S(5,"Five")S(6,"Six")S(7,"Seven")S(8,"Eight")S(9," Nine")S(10,"Ten")
> S(11,"Eleven")S(12,"Twelve")S(13,"Thirteen")S(14," Fourteen")S(15,
> "Fifteen")S(16,"Sixteen")S(17,"Seventeen")S(18,"Ei ghteen")S(19,
> "Nineteen")O(0," ")O(1," one")O(2," two")O(3," three")O(4," four")
> O(5," five")O(6," six")O(7," seven")O(8," eight")O(9," nine")T(2,
> "Twenty")T(3,"Thirty")T(4,"Forty")T(5,"Fifty")T(6, "Sixty")T(7,
> "Seventy")T(8,"Eighty")T(9,"Ninety")t<i I>struct pre<false,I>{
> static v print(){print_tens<(I-I%10)/10>();p<(I%10)>();}};t<i I>
> v pr(){pre<(I<20),I>:rint();} t<i I>in v B(){pr<I>();c<<" bottles \
> of beer";}t<>in v B<1>(){pr<1>();c<<" bottle of beer";}t<i I>in
> v Bo(){B<I>();c << " on the wall";}t<i I>in v stanza(){Bo<I>();c<<
> ",\n";B<I>();c<<",\n";}t<i I>in v bridge(){c<<"Take one down, pass \
> it around,"<<endl;Bo<I-1>();c<<",\n";}t<>in v bridge<0>(){c<<"Go to \
> the store and buy some more,"<<endl;Bo<99>();}t<i I>in v verse(){
> stanza<I>();bridge<I>();}t<i I>in v sing(){verse<I>();c<<endl;sing<I
> -1>();}t<>in v sing<0>(){verse<0>();}i main(){sing<99>();}
>
> I hope it helps
>
> sk


IS THIS(1000-2000) lines of code !!!!!!!!!!!!!!!!!!!


 
Reply With Quote
 
puppet_sock@hotmail.com
Guest
Posts: n/a
 
      07-19-2004
"Robert Bralic" <(E-Mail Removed)> wrote in message news:<cdggqf$897$(E-Mail Removed)>...
[happy song code example snipped]
> IS THIS(1000-2000) lines of code !!!!!!!!!!!!!!!!!!!


99 request to do my homework on the group
99 request to do my homework.
Download one request
Deride it with glee.
98 requests to do my homework on the group.


Hey Bob. Read the FAQ.
Socks
 
Reply With Quote
 
 
 
Reply

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
MSDOS-Based Compilable Code for RSA / Other Public-Key Scheme Crypto Loko C Programming 3 10-16-2005 01:18 PM
Re: Any non-GNU compilers? sick of GNU copylefts Markus Elfring C++ 2 02-23-2005 10:24 PM
1 day gnu, whole life gnu? Peter Java 3 01-10-2005 02:26 PM
Should this substitution be compilable? valentin tihomirov VHDL 12 11-30-2004 03:44 PM
Who can resist a compilable example? - JComboBox VisionSet Java 3 09-02-2004 05:35 AM



Advertisments