12-22-2010
I declare foo2 before main as this: void * foo2(void *arg);
foo2 is a function which a thread from thread pool will execute.
I correct some things and the new errors are:
c:63: error: expected declaration specifiers or ‘...' before ‘(' token
c:104: warning: passing argument 2 of ‘foo' from incompatible pointer type
c:63: note: expected ‘void (*)(void *)' but argument is of type ‘void * (*)(void *)'
c:104: error: too many arguments to function ‘foo'
c: At top level:
c:110: error: expected declaration specifiers or ‘...' before ‘(' token
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Sir,
I have a file containing say 1000 lines that contain 100 paragraphs of 10 lines each separated by blank lines.I have to match a pattern or a string "hdfhasdjkasdhs" and print the complete paragraphs containing these strings.I can do this with the help of line editor ex,but how can I use... (1 Reply)
Discussion started by: Piyush
1 Replies
2. Programming
I am having strange warnings from gcc compiler, which I don't think should come while cmpiling.
Can anyone help? The warnings are:
- warning: implicit declaration of function 'bzero'
- warning: implicit declaration of function 'inet_addr'
The code is as below:
int main(int argc, char... (2 Replies)
Discussion started by: Ahsan
2 Replies
3. UNIX for Advanced & Expert Users
Im trying to replace every line
line1
line2
line3
with:
line1
extraline1
line2
extraline2
line3
extraline3
with about 10 extra lines
I am able to add axtra lines with: (17 Replies)
Discussion started by: Dave724001
17 Replies
4. Shell Programming and Scripting
Hi,
I'm a beginners, this is one of my first script, it's easy, but I don't know how to write this script:
The script receive in input 4 parameters:
1) user_name
2) r and/or w and/or x ( rwx, rw, x, ....)
3) u and/or g and/or o ( u, uo, ugo, ...)
4) the path name
The script print a... (2 Replies)
Discussion started by: DNAx86
2 Replies
5. Programming
Hi,
I'm tying to use the following function to reboot the system as part of my code
#include <unistd.h>
#include <linux/reboot.h>
int restart(unsigned int delay)
{
sleep(delay);
return reboot(LINUX_REBOOT_CMD_RESTART);
}
When I try to compile the code I get the warning in the... (2 Replies)
Discussion started by: galapogos
2 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
I would like to declare a vector of variables and access them sequentially.
Here is my code
ARRAY_CT="0001000000 0000100000 0000010000"
ELEMENTS_CT=${#ARRAY_CT}
echo $ELEMENTS_CT
for (( j=1;j<=$ELEMENTS_IS;j++)); do
echo ${ARRAY_IS}
done
... (2 Replies)
Discussion started by: f_o_555
2 Replies
7. Shell Programming and Scripting
I don't know if this is a big issue or not, but I'm having difficulties. I apoligize for the upcoming essay :o.
I'm writing a script, similar to a paint program that edits images, but in the form of ANSI block characters. The program so far is working. I managed to save the image into a file,... (14 Replies)
Discussion started by: tinman47
14 Replies
8. Programming
Hello,
I was reading Heuritics text and came across an algorithm below. Finding hard to analyze it can any one help me out below...
How to analyze if I take say no. of types are 5 and each type has say 20 coins.
thanks.
Let {c1, c2...cn=1} be a set of distinct coin types where ci is... (1 Reply)
Discussion started by: sureshcisco
1 Replies
9. Shell Programming and Scripting
Hi All,
I have the script as below
#!bin/bash
let k=9
if
then
echo "Start"
Hello
echo "End"
else
echo "failed"
fi
function Hello() {
echo "hello !!!!"
}
I got the below error : (4 Replies)
Discussion started by: Balasankar
4 Replies
10. Linux
I know Xenix is a little outdated, and is dangerous to use on network.
But this is a virtual machine, and I like to play retrocomputing sometime.
The question is..why ftp over slip doesn't work?
I've set this Xenix vm on libvirt
<domain type='kvm' id='5'... (2 Replies)
Discussion started by: Linusolaradm1
2 Replies
LEARN ABOUT MOJAVE
ppi::statement::variable5.18
PPI::Statement::Variable(3) User Contributed Perl Documentation PPI::Statement::Variable(3)
NAME
PPI::Statement::Variable - Variable declaration statements
SYNOPSIS
# All of the following are variable declarations
my $foo = 1;
my ($foo, $bar) = (1, 2);
our $foo = 1;
local $foo;
local $foo = 1;
LABEL: my $foo = 1;
INHERITANCE
PPI::Statement::Variable
isa PPI::Statement::Expression
isa PPI::Statement
isa PPI::Node
isa PPI::Element
DESCRIPTION
The main intent of the "PPI::Statement::Variable" class is to describe simple statements that explicitly declare new local or global
variables.
Note that this does not make it exclusively the only place where variables are defined, and later on you should expect that the "variables"
method will migrate deeper down the tree to either PPI::Statement or PPI::Node to recognise this fact, but for now it stays here.
METHODS
type
The "type" method checks and returns the declaration type of the statement, which will be one of 'my', 'local', 'our', or 'state'.
Returns a string of the type, or "undef" if the type cannot be detected (which is probably a bug).
variables
As for several other PDOM Element types that can declare variables, the "variables" method returns a list of the canonical forms of the
variables defined by the statement.
Returns a list of the canonical string forms of variables, or the null list if it is unable to find any variables.
symbols
Returns a list of the variables defined by the statement, as PPI::Token::Symbols.
TO DO
- Write unit tests for this
SUPPORT
See the support section in the main module.
AUTHOR
Adam Kennedy <adamk@cpan.org>
COPYRIGHT
Copyright 2001 - 2011 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.18.2 2011-02-25 PPI::Statement::Variable(3)