Why I Love (actually Hate) C

This is a visual demonstration as to why I hate programming in C (and C++) :

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
[ 89%] Built target gsclient
[ 90%] Built target gsclient-static
[ 91%] Built target glibNetTest
Scanning dependencies of target geTest
[ 91%] Building CXX object 
            tests/func/GE/CMakeFiles/geTest.dir/GeometryEngineTest.o
/home/dloman/devel/geomcore/trunk/tests/func/GE/GeometryEngineTest.cxx:
   In function ‘tree* leaf_fn_call(db_tree_state*, 
                              const db_full_path*, rt_db_internal*, void*)’:
/home/dloman/devel/geomcore/trunk/tests/func/GE/GeometryEngineTest.cxx:49:
   error: ‘list’ is not a member of ‘std’
/home/dloman/devel/geomcore/trunk/tests/func/GE/GeometryEngineTest.cxx:49:
   error: expected primary-expression before ‘>’ token
/home/dloman/devel/geomcore/trunk/tests/func/GE/GeometryEngineTest.cxx:49:
   error: ‘dataList’ was not declared in this scope
/home/dloman/devel/geomcore/trunk/tests/func/GE/GeometryEngineTest.cxx:49:
   error: ‘list’ is not a member of ‘std’
/home/dloman/devel/geomcore/trunk/tests/func/GE/GeometryEngineTest.cxx:49:
   error: expected primary-expression before ‘>’ token
/home/dloman/devel/geomcore/trunk/tests/func/GE/GeometryEngineTest.cxx:49:
   error: expected primary-expression before ‘)’ token
/home/dloman/devel/geomcore/trunk/tests/func/GE/GeometryEngineTest.cxx:49:
   error: expected `;' before ‘myPointer’
make[2]: *** [tests/func/GE/CMakeFiles/geTest.dir/GeometryEngineTest.o] Error 1
make[1]: *** [tests/func/GE/CMakeFiles/geTest.dir/all] Error 2
make: *** [all] Error 2

 

19 lines of console vomit for one, simple little fix. From this:

 

1
2
#include <bu.h>
#include <raytrace.h>

 

to this:

 

1
2
3
#include <bu.h>
#include <raytrace.h>
#include <list>

 

Fixed. I hate C ……and C++

 

 

This entry was posted in David's Blog and tagged , , . Bookmark the permalink.

One Response to Why I Love (actually Hate) C

  1. Sandy Sandy says:

    you love it, you know you do. I catch you reading the book ALL the time

Leave a Reply

Your email address will not be published. Required fields are marked *