Sponsored Content
Top Forums Programming c++ object constructor question Post 302432758 by Corona688 on Saturday 26th of June 2010 05:05:48 PM
Old 06-26-2010
Quote:
Originally Posted by santiagorf
I know the problem is that function should have been called with an object from Param, but I was expecting that the constructor Param(int , int) would do the job.
It might be if you'd actually called it. You're just feeding it 2,3 not Param(2,3).
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Constructor problem

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

why constructor cannot be virtual

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

how do you handle a constructor and destructor that fail

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

Doubt regarding Copy Constructor and return value

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

Object reference not set to an instance of an object

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

question about function object

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

Shared Object Question

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

Doubts on C++ copy constructor concept

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

Constructor?

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 with another object of different class?

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
Param(3pm)						User Contributed Perl Documentation						Param(3pm)

NAME
APR::Request::Param - wrapper for libapreq2's param API. SYNOPSIS
use APR::Request::Param; $arg1 = $req->args('alpha'); $body = $req->body; $body->param_class("APR::Request::Param"); ok $_->isa("APR::Request::Param") for values %$body; @uploads = grep {$_->upload} values %$body; $param = $body->get('beta'); $param->upload_slurp(my $content); DESCRIPTION
The "APR::Request::Param" module provides base methods for interfacing with libapreq2's param API. It also provides a few utility functions and constants. This manpage documents version 2.13 of the APR::Request::Param, APR::Request::Brigade, and APR::Request::Brigade::IO packages. OVERLOADS
APR::Request::Param "" "$param" The double-quote interpolation operator maps to "APR::Request::Param::value()". METHODS
APR::Request::Param name $param->name() Returns the param's name. This attribute cannot be modified. value $param->value() Returns the param's value. This attribute cannot be modified. is_tainted $param->is_tainted() $param->is_tainted($set) Get/set the param's internal tainted flag. Note: if the param's charset is APREQ_CHARSET_UTF8(8), this also activates the SvUTF8_on flag during calls to name() and/or value(). $tainted = $param->is_tainted; $param->is_tainted(0); ok $param->is_tainted == 0; charset $param->charset() $param->charset($set) Get/set the param's internal charset. The charset is a number between 0 and 255; the current recognized values are 0 APREQ_CHARSET_ASCII (7-bit us-ascii) 1 APREQ_CHARSET_LATIN1 (8-bit iso-8859-1) 2 APREQ_CHARSET_CP1252 (8-bit Windows-1252) 8 APREQ_CHARSET_UTF8 (utf8 encoded Unicode) See is_tainted above for info about how APREQ_CHARSET_UTF8 relates to perl's UTF-8 flag. $charset = $param->charset; $param->charset(2); ok $param->charset == 2; make APR::Request::Param->make($pool, $name, $value) Fast XS param constructor. info $param->info() $param->info($set) Get/set the APR::Table headers for this param. upload $param->upload() $param->upload($set) Get/set the APR::Brigade file-upload content for this param. upload_filename $param->upload_filename() Returns the client-side filename associated with this param. upload_link $param->upload_link($path) Links the file-upload content with the local file named $path. Creates a hard-link if the spoolfile's (see upload_tempname) temporary directory is on the same device as $path; otherwise this writes a copy. upload_slurp $param->upload_slurp($data) Reads the entire file-upload content into $data. upload_size $param->upload_size() Returns the size of the param's file-upload content. upload_type $param->upload_type() Returns the MIME-type of the param's file-upload content. upload_tempname $param->upload_tempname() Returns the name of the local spoolfile for this param. upload_io $param->upload_io() Returns an APR::Request::Brigade::IO object, which can be treated as a non-seekable IO stream. upload_fh $param->upload_fh() Returns a seekable filehandle representing the file-upload content. METHODS
APR::Request::Brigade This class is derived from APR::Brigade, providing additional methods for TIEHANDLE, READ and READLINE. To be memory efficient, these methods delete buckets from the brigade as soon as their data is actually read, so you cannot "seek" on handles tied to this class. Such handles have semantics similar to that of a read-only socket. new, TIEHANDLE APR::Request::Brigade->TIEHANDLE($bb) Creates a copy of the bucket brigade represented by $bb, and blesses that copy into the APR::Request::Brigade class. This provides syntactic sugar for using perl's builtin "read", "readline", and "<>" operations on handles tied to this package: use Symbol; $fh = gensym; tie *$fh, "APR::Request::Brigade", $bb; print while <$fh>; READ $bb->READ($contents) $bb->READ($contents, $length) $bb->READ($contents, $length, $offset) Reads data from the brigade $bb into $contents. When omitted $length defaults to "-1", which reads the first bucket into $contents. A positive $length will read in $length bytes, or the remainder of the brigade, whichever is greater. $offset represents the index in $context to read the new data. READLINE $bb->READLINE() Returns the first line of data from the bride. Lines are terminated by linefeeds (the '12' character), but we may eventually use $/ instead. METHODS
APR::Request::Brigade::IO read OO interface to APR::Request::Brigade::READ. readline OO interface to APR::Request::Brigade::READLINE. SEE ALSO
APR::Request, APR::Table, APR::Brigade. COPYRIGHT
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. perl v5.10.1 2011-02-28 Param(3pm)
All times are GMT -4. The time now is 09:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy