06-29-2010
I stand corrected, then. You still can't cast one parameter into two parameters, though. It could take a single class that had two members.
A better way to handle this case would be to overload function itself -- make another function of the same name that does in fact take two integers.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi guys I am new to these forums but since I am taking a class at college I would appreciate any help that is possible for this program. My instructor said that when its complete the program should be able to store all 3 fields instead of just 1.
public class Greeter2Test
{
public static... (4 Replies)
Discussion started by: woot4moo
4 Replies
2. Programming
helo i read many books but i cant find the proper answer that why
constructor cannot be virtual
can u explain me in simple term that why constructor cannot be virtual
Regards,
Amit (2 Replies)
Discussion started by: amitpansuria
2 Replies
3. Programming
helo i m new in c++ on linux
can u tell me with an simple example that how do you handle constructor and destructor that fail?
Regards,
Amit (4 Replies)
Discussion started by: amitpansuria
4 Replies
4. Programming
Hi All,
I have made the simple following program :-
#include <string>
#include <iostream>
using namespace std;
class A{
private: int val;
public :
A(){cout<<"In A()"<<endl;}
A (const A& aa)
{
cout<<"In copy c'tor"<<endl;
}
};
A f(... (1 Reply)
Discussion started by: shubhranshu
1 Replies
5. UNIX for Dummies Questions & Answers
I am new to PHP and UNIX. I am using Apache to do my testing on a Windows Vista machine.
I am getting this error when I am trying to connect to a web service. I did a search and did not see any posts that pertain to this.
Here is my function:
<?php
function TRECSend($a, $b, $c, $d,... (0 Replies)
Discussion started by: EddiRae
0 Replies
6. Programming
I have a code as following:
#include <iostream>
#include <algorithm>
#include <list>
using namespace std;
//the class Nth is a predicates
class Nth{
private:
int nth;
int count;
public:
Nth(int n):nth(n),count(0){}
bool operator()(int){
... (2 Replies)
Discussion started by: homeboy
2 Replies
7. Programming
Hello,
I am new to programming shared objects and I was hoping someone could tell me if what I want to do is possible, or else lead me in the right direction.
I have a main program that contains an abstract base class. I also have a subclass that I'm compiling as a shared object. The subclass... (13 Replies)
Discussion started by: dorik
13 Replies
8. Programming
Hi,
If I run the following program
class A {
public:
A() { cout << "default" << endl; }
A(const A&) { cout << "copy" << endl; }
};
A tmp;
A fun() {
return tmp;
}
A test() {
A tmp;
cout << &tmp << endl;
return tmp;
} (1 Reply)
Discussion started by: royalibrahim
1 Replies
9. Programming
I am learning about C++ and today am reading concepts for Constructor but it seems a bit difficult to grab it fully. Please anyone explain in simple words about Constructor? (1 Reply)
Discussion started by: ggiwebsinfo
1 Replies
10. Programming
How to initialize an object of class say "A", with an object of type say "B".
The following code give the error message "error: conversion from âAâ to non-scalar type âBâ requested"
#include <iostream>
using namespace std;
class B;
class A{
public:
A() { cout <<"\nA()" << endl; }
... (1 Reply)
Discussion started by: techmonk
1 Replies
LEARN ABOUT DEBIAN
mixin::extrafields::param
Mixin::ExtraFields::Param(3pm) User Contributed Perl Documentation Mixin::ExtraFields::Param(3pm)
NAME
Mixin::ExtraFields::Param - make your class provide a familiar "param" method
VERSION
version 0.011
$Id: /my/cs/projects/Mixin-ExtraFields-Param/trunk/lib/Mixin/ExtraFields/Param.pm 29059 2006-12-11T03:20:29.045283Z rjbs $
SYNOPSIS
package Widget::Parametric;
use Mixin::ExtraFields::Param -fields => { driver => 'HashGuts' };;
...
my $widget = Widget::Parametric->new({ flavor => 'vanilla' });
printf "%s: %s
", $_, $widget->param($_) for $widget->param;
DESCRIPTION
This module mixes in to your class to provide a "param" method like the ones provided by CGI, CGI::Application, and other classes. It uses
Mixin::ExtraFields, which means it can use any Mixin::ExtraFields driver to store your data.
By default, the methods provided are:
o param
o exists_param
o delete_param
These methods are imported by the "fields" group, which must be requested. If a "moniker" argument is supplied, the moniker is used
instead of "param". For more information, see Mixin::ExtraFields.
METHODS
param
my @params = $object->param; # get names of existing params
my $value = $object->param('name'); # get value of a param
my $value = $object->param(name => $value); # set a param's value
my @values = $object->param(n1 => $v1, n2 => $v2, ...); # set many values
This method sets or retrieves parameters.
AUTHOR
Ricardo SIGNES, "<rjbs@cpan.org>"
BUGS
Please report any bugs or feature requests to <http://rt.cpan.org>, for Mixin-ExtraFields-Param. I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.
COPYRIGHT
Copyright 2005-2006 Ricardo Signes, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.1 2006-12-11 Mixin::ExtraFields::Param(3pm)