Page 1 of 1

Do not go into programming.

Posted: January 24th, 2006, 22:29
by deject

Code: Select all

In file included from circle.cpp:1:
circle.h:5: syntax error before `:' token
circle.h:12: `point' was not declared in this scope
circle.h:12: syntax error before `,' token
circle.h:12: ISO C++ forbids declaration of `circle' with no type
circle.h:13: `circle' was not declared in this scope
circle.h:13: syntax error before `)' token
circle.h:13: ISO C++ forbids declaration of `circle' with no type
circle.h:16: syntax error before `)' token
circle.h:17: `double' fails to be a typedef or built in type
circle.h:17: ISO C++ forbids declaration of `get_radius' with no type
circle.h:17: non-member function `int get_radius()' cannot have `const' method 
   qualifier
circle.h: In function `int get_radius()':
circle.h:17: `radius' undeclared (first use this function)
circle.h:17: (Each undeclared identifier is reported only once for each 
   function it appears in.)
circle.h: At global scope:
circle.h:18: `point' was not declared in this scope
circle.h:18: syntax error before `)' token
circle.h:18: `void' fails to be a typedef or built in type
circle.h:18: ISO C++ forbids declaration of `set_center' with no type
circle.h:19: `void' fails to be a typedef or built in type
circle.h:19: ISO C++ forbids declaration of `set_radius' with no type
circle.h:19: `double' fails to be a typedef or built in type
circle.h:19: ISO C++ forbids declaration of `inrad' with no type
circle.h:22: `circle' was not declared in this scope
circle.h:22: syntax error before `,' token
circle.h:22: `bool operator!=(...)' must have an argument of class or 
   enumerated type
circle.h:22: `bool operator!=(...)' must take exactly two arguments
circle.h:23: `double' fails to be a typedef or built in type
circle.h:23: ISO C++ forbids declaration of `area' with no type
circle.h:26: `circle' was not declared in this scope
circle.h:26: syntax error before `,' token
circle.h:26: friend declaration not in class definition
circle.h:26: `bool operator==(...)' must have an argument of class or 
   enumerated type
circle.h:26: `bool operator==(...)' must take exactly two arguments
circle.h:30: `double' fails to be a typedef or built in type
circle.h:30: ISO C++ forbids declaration of `radius' with no type
circle.h:30: `int radius' used prior to declaration
circle.h:31: syntax error before `}' token
circle.h:34: `circle' was not declared in this scope
circle.h:34: `a' was not declared in this scope
circle.h:34: syntax error before `&' token
circle.h:34: `void' fails to be a typedef or built in type
circle.h:34: ISO C++ forbids declaration of `shift' with no type
circle.h:35: syntax error before `&' token
circle.h:36: syntax error before `&' token
circle.cpp:4: syntax error before `::' token
circle.cpp:6: ISO C++ forbids declaration of `radius' with no type
circle.cpp:6: redefinition of `int radius'
circle.h:30: `int radius' previously declared here
circle.cpp:6: warning: initialization to `int' from `double'
circle.cpp:6: warning: argument to `int' from `double'
circle.cpp:7: syntax error before `}' token
circle.cpp:9: syntax error before `::' token
circle.cpp:11: ISO C++ forbids declaration of `radius' with no type
circle.cpp:11: redefinition of `int radius'
circle.cpp:6: `int radius' previously defined here
circle.cpp:11: `rad' was not declared in this scope
circle.cpp:12: syntax error before `}' token
circle.cpp:14: syntax error before `::' token
circle.cpp:16: ISO C++ forbids declaration of `radius' with no type
circle.cpp:16: redefinition of `int radius'
circle.cpp:11: `int radius' previously defined here
circle.cpp:16: `x' was not declared in this scope
circle.cpp:17: syntax error before `<<' token
circle.cpp:20: syntax error before `::' token
circle.cpp:24: syntax error before `::' token
circle.cpp:28: syntax error before `::' token
circle.cpp:35: syntax error before `::' token
circle.cpp:40: `circle' was not declared in this scope
circle.cpp:40: syntax error before `,' token
circle.cpp:40: `bool operator==(...)' must have an argument of class or 
   enumerated type
circle.cpp:40: `bool operator==(...)' must take exactly two arguments
circle.cpp: In function `bool operator==(...)':
circle.cpp:41: `a' undeclared (first use this function)
circle.cpp:41: `b' undeclared (first use this function)
circle.cpp: At global scope:
circle.cpp:47: syntax error before `,' token
circle.cpp:47: `void' fails to be a typedef or built in type
circle.cpp:47: ISO C++ forbids declaration of `shift' with no type
circle.cpp: In function `int shift(...)':
circle.cpp:49: `x_move' undeclared (first use this function)
circle.cpp:49: `y_move' undeclared (first use this function)
circle.cpp:49: `temp' undeclared (first use this function)
circle.cpp:49: `circle' undeclared (first use this function)
circle.cpp: At global scope:
circle.cpp:52: syntax error before `&' token
circle.cpp:54: 'point' is used as a type, but is not defined as a type.
circle.cpp:55: syntax error before `<<' token
circle.cpp:56: syntax error before `>>' token
circle.cpp:57: syntax error before `<<' token
circle.cpp:58: syntax error before `>>' token
circle.cpp:59: syntax error before `<<' token
circle.cpp:60: syntax error before `<<' token
circle.cpp:61: ISO C++ forbids declaration of `cent' with no type
circle.cpp:61: `x_pos' was not declared in this scope
circle.cpp:61: `y_pos' was not declared in this scope
circle.cpp:61: `point' was not declared in this scope
circle.cpp:62: ISO C++ forbids declaration of `a' with no type
circle.cpp:62: `int a' used prior to declaration
circle.cpp:62: `cent' was not declared in this scope
circle.cpp:62: `rad' was not declared in this scope
circle.cpp:63: syntax error before `return'
circle.cpp:66: syntax error before `&' token
make: *** [circle.o] Error 1

Posted: January 24th, 2006, 22:36
by Dr. kitteny berk
IF TYPING = 0 THEN CODE = 0

Posted: January 24th, 2006, 22:38
by spoodie
All that just to make a circle! Here's one I made for you and even added so extras, I didn't make an errors either

Image

Posted: January 24th, 2006, 22:39
by Dr. kitteny berk
spoodie wrote:All that just to make a circle! Here's one I made for you and even added so extras, I didn't make an errors either

Image

Posted: January 24th, 2006, 22:42
by FatherJack
Programming would be a blessed relief from the world of shit I currently inhabit as a specialist of a system currently being emasculated as the ultimate root of all evil and cause of all problems whilst simultaeously being tasked with the specification of its replacement.

Posted: January 24th, 2006, 22:43
by spoodie
You mod haxed that in :ignore:

Posted: January 24th, 2006, 22:48
by deject
Dr. kitteny berk wrote:
spoodie wrote:All that just to make a circle! Here's one I made for you and even added so extras, I didn't make an errors either

Image

pffffft!

Posted: January 24th, 2006, 22:50
by FatherJack
Dr. kitteny berk wrote:
spoodie wrote:All that just to make a circle! Here's one I made for you and even added so extras, I didn't make an errors either

Image

Posted: January 24th, 2006, 22:51
by Dr. kitteny berk
pffft.

Posted: January 24th, 2006, 22:55
by spoodie
stop mod editing errors into my error-free posts :shakefist:

:)

Re: Do not go into programming.

Posted: January 24th, 2006, 23:12
by TezzRexx
deject wrote:Don't go into Python programming
FIX'D

Posted: January 24th, 2006, 23:21
by deject
:boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie:
:boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie:
:boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie:
:boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie:
:boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie:
:boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie:
:boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie: :boogie:

Code: Select all

g++ -g -c circle.cpp
In file included from circle.cpp:1:
circle.h:37: `istream' was not declared in this scope
circle.h:37: `ins' was not declared in this scope
circle.h:37: syntax error before `&' token
circle.h:37: `std::istream& operator<<(...)' must have an argument of class or 
   enumerated type
circle.h:37: `std::istream& operator<<(...)' must take exactly two arguments
circle.h:38: `ostream' was not declared in this scope
circle.h:38: `outs' was not declared in this scope
circle.h:38: syntax error before `&' token
circle.h:38: `std::ostream& operator>>(...)' must have an argument of class or 
   enumerated type
circle.h:38: `std::ostream& operator>>(...)' must take exactly two arguments
circle.cpp: In function `void shift(circle&, double, double)':
circle.cpp:51: request for member `get_y' in `a->circle::get_center() const', 
   which is of non-aggregate type `<unknown type>'
circle.cpp: In function `std::istream& operator>>(std::istream&, circle&)':
circle.cpp:61: `radius' undeclared (first use this function)
circle.cpp:61: (Each undeclared identifier is reported only once for each 
   function it appears in.)
circle.cpp:64: syntax error before `:' token
circle.cpp: In function `std::ostream& operator<<(std::ostream&, circle&)':
circle.cpp:68: no matching function for call to `circle::get_x()'
circle.cpp:68: no matching function for call to `circle::get_y()'
make: *** [circle.o] Error 1

almost done!

Posted: January 25th, 2006, 8:45
by Woo Elephant Yeah
ImageImageImage
ImageImageImage
ImageImageImage

Posted: January 25th, 2006, 9:57
by Hehulk
Woo Elephant Yeah wrote:ImageImageImage
ImageImageImage
ImageImageImage
LIES!

Posted: January 25th, 2006, 10:54
by spoodie
Here's some code what I wrote recently. It's for adding user accounts to newly installed Linux servers, basic stuff but isn't it pretty.

Code: Select all

#!/bin/bash

passwd=${MNT_PT}/misc/passwd
shadow=${MNT_PT}/misc/shadow
lineid=1

if [[ ! -r $passwd || ! -r $shadow ]] ; then
        echo "ERROR: user files not found"
        exit 1
fi

linecount=$(wc -l $passwd | awk '{print $1}')
shadowcount=$(wc -l $shadow | awk '{print $1}')

if [[ ${linecount} -ne ${shadowcount} ]] ; then
        echo "ERROR: line count mismatch"
        exit 1
fi

while [[ ${lineid} -le ${linecount} ]]
do
        line=$(sed -n ${lineid}p ${passwd})

        name=$(echo ${line} | cut -d':' -f1)
        uid=$(echo ${line} | cut -d':' -f3)
        gid=$(echo ${line} | cut -d':' -f4)
        comment=$(echo ${line} | cut -d':' -f5)
        home=$(echo ${line} | cut -d':' -f6)
        shell=$(echo ${line} | cut -d':' -f7)

        pword=$(grep -e "^${name}:" ${shadow} | cut -d':' -f2)

        grep -q ":${gid}:" /etc/group 2> /dev/null
        if [[ $? -ne 0 ]] ; then
                echo "Adding group: ${name}"
                groupadd -g $gid $name
        fi

        grep -q "^$name:" /etc/passwd 2> /dev/null
        if [[ $? -ne 0 ]] ; then
                echo "Adding user: ${name}"
                useradd -u $uid -g $gid -d $home -s $shell -c "$comment" -p "$pword" -M $name
        fi

        (( lineid+=1 ))
done

Posted: January 25th, 2006, 10:54
by Lateralus
Hehulk wrote:
Woo Elephant Yeah wrote:ImageImageImage
ImageImageImage
ImageImageImage
LIES!
HAX! VIDEOTAPE!