Thanks again. Further to this, why is "void" used as a parameter in a function that takes no arguments, i.e. int main (void)
I see this a bit in C (I started out learning C++) , why not just use
int main()
?
Is main a special case, or do you always use void in this way in a function that takes no arguments?
Which of the following is correct in C? myFunction(void)
OR myFunction()
?
There is no need to put void as function arguements, but people do it anyway, probaly for clarifacation when others read their code. But remember that function(void) isn't required, but void function() is. The latter means a function without a return value.
There is no need to put void as function arguements.
Not necessarily so...
In ANSI C, the following happens...
1. if the return type is empty it is considered an 'int'.
2. if the function has a void or a list of arguments those are the arguments that the compiler will check against.
3. if the argument list is empty it is effectively saying "I don't know what the arguments are" and you can call it with any arguments you like and may only get a warning. It is equivalent of ellipses, (...)
There may only be a warning only for the "myz(1)".
Hi 'm getting error while installing perl mdule on linux.can any one tell me how to resolve that error?
problem is:
CPAN: File::Temp loaded ok (v0.22)
CPAN.pm: Going to build J/JD/JDB/Win32-OLE-0.1709.tar.gz
OS unsupported
Warning: No success on command
Warning (usually harmless):... (1 Reply)
Hi,
I have used pdftotext with good results in the past, but today for some reason I keep getting the same error message.
My command is as follows:
And the error message is
I am using Vmware player with Ubuntu server, but I don't think that is causing this issue as I have been using... (2 Replies)
I'd like to install cpufreq modules on my server .
I tried
sudo modprobe acpi-cpufreq
but got the error
FATAL: Error inserting acpi_cpufreq (/lib/modules/2.6.18-238.12.1.el5xen/kernel/arch/x86_64/kernel/cpufreq/acpi-cpufreq.ko): No such device
cat /proc/cpuinfo gives this
... (11 Replies)
I have one big module 2.6.18 kernel mod.c
I want to divide this to several files.
The problem is to write right Makefile
lib1.h
lib1.c
mod.c
mod.c works fine normally but when I divide into several files
and try to compile with this makefile
obj-m := mod.o
mod-objs := lib1.o
... (3 Replies)
Hi masters,
I am new to linux and unix forum and this is my first forum. So please excuse if
I am not giving sufficient information. I will give them on request.
I have created a bandwidth manager module. I am using a 2.6.9 kernel and in Red Hat 3.4.3 distribution. But when i run make... (1 Reply)
Hi,
I am using Tk module in perl 5.6 and it is working fine. Now when i installed the newer version 5.10.0 then getting error that Tk module not found. But i will have to work on this newer verison only to use some other modules of perl.
I want to know why Tk module is not working in newer... (6 Replies)
Hi All
Im trying to access the my windows XP NTFS from Redhat linux 4.0 Enterprise edition
I have downloaded the respective rpm
And im able to install it successfully
Then i have given the following command , but got an error
Here are my partitions
And when i give the below... (1 Reply)
Hello Friends,
I am learning Perl now. I have a small query.
I have a directory Z with file name Z.txt.
I would like to copy this file Z.txt to 3 new dir with new filenames as follows
dir 1 1.txt
dir 2 2.txt
dir 3 3.txt
I would like to then open 1.txt from dir 1 and edit the first... (0 Replies)