Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

The C++

Name: Anonymous 2010-11-10 12:42

ENTERPRISE C++ uses templates and ambigious function names for EVERYTHING.


#include <iostream>
#include <vector>
#include <cstdio>

template<typename s_t> void _sv(s_t&_s,const s_t&_i){_s=static_cast<s_t>(_i);}
template<typename t_1> bool _isl(t_1&_1,t_1&_2){return(_1<_2);}
template<typename t_1>bool _ise(t_1&_1,const t_1&_2){return(_1==_2);}
template<typename t_1>void _ic(t_1&s,const t_1&v){(s=s+v);}
template<typename a_t>class c_1:public std::vector<a_t>{};
template<typename a_t, typename b_t> class _a{
    a_t a;
    a_t _1_i;
    b_t b;
    char* _c;
    c_1<std::string> _rs;
    public:
        _a(a_t _a, b_t _b): a(_a), b(_b)
        {
            int _h_i;
            _1_i=0;
            if(_ise(a,1)) goto _L0;
            for(_sv(_h_i,1);_isl(_h_i,a);_ic(_h_i,1))
            {
                _c=b[_h_i];
                _rs.push_back(_c);
            }
            _1_n(); return;
            _L0: printf("go cry in a corner\n");
        }
        void _1_n()
        {
            std::string _1_s;
            typename c_1<std::string>::iterator _hi;
            _hi=_rs.begin();
            _L1: if(_hi==_rs.end())return;
            _1_s=*_hi;
            printf("argv[%d] = %s\n", _1_i, _1_s.c_str());
            _hi++; _1_i++; goto _L1;
        }
};

int main(int a, char** b)
{
    _a<int,char**>(a,b);
}

Name: Anonymous 2010-11-12 23:08

>>36
Now that makes sense.

And by the way, my dear >>35:
1. A scope is a scope, the context where some variable live. C have one.
2. C structs are POD, you can't have methods in a struct, is not a fucking nerfed class like in C++, this doesn't mean that scope is ``void and useless''.
3. Because your little poor fingers hurts when you have to type just one little fucking function at the end of the scope.

You have a strange concept of scope, look at this code:

{ /* begin of the scope */
  int i; /* C automatically allocates i on the stack */
  struct astruct *s; /* C automatically allocates a pointer to ``astruct'' on the stack */
  struct anotherstruct s2;
  astruct_init(s); /* We manually call the constructor */
  anotherstruct_init(&s2);
  /* do some stuff */
  anotherstruct_destroy(&s2);
  astruct_destroy(s); /* OH MY GOD WE ARE CALLING THE DESTRUCTOR MANUALLY PLEASE KILL ME I'VE DISONORED MY FAMILY I WANT TO DIE */
} /* end of the scope, C automatically destroys i, s (the pointer) and the struct s2. */


Sure, it doesn't mean you can do RAII in C, but "C can't do RAII" and "C doesn't have a scope" are two different things.

If you can't remember what you have to deallocate at the end of a scope, go back to your C++.

You're now destroying your structures manually

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List