What's wrong with this code? 212848

Is this legal C++03 code:

template <class T>
struct A
{
    template<class U>
    A(int, long)
    {
    }
};

int main()
{
    A<int> a(2, 3L);
}

I have tried compiling this with g++ 3.4.6:
-----------------------------------------------------------
A.cpp: In function `int main()':
A.cpp:12: error: no matching function for call to `A<int>::A(int, long
int)'
A.cpp:3: note: candidates are: A<int>::A(const A<int>&)

It fails on Comeau as well:
--------------------------------------
"ComeauTest.c", line 4: warning: template parameter "U" is not used in
declaring the
           parameter types of function template "A<T>::A"
      template<class U>
                     ^

"ComeauTest.c", line 12: error: no instance of constructor "A<T>::A
[with T=int]"
           matches the argument list
             The argument types that you used are: (int, long)
      A<int> a(2, 3L);
               ^



I don't really understand why this should not work. Is it really
necessary for typename U to play a role to select the correct
constructor?

-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
shri314
5/10/2009 4:38:03 PM
comp.lang.c++.moderated 10706 articles. 11 followers. allnor (8507) is leader. Post Follow

8 Replies
212 Views

Similar Articles

[PageSpeed] 49
On May 10, 4:38 pm, "shri...@gmail.com" <shri...@gmail.com> wrote:
> Is this legal C++03 code:
>
> template <class T>
> struct A
> {
>     template<class U>
>     A(int, long)
>     {
>     }
>
> };
>
> int main()
> {
>     A<int> a(2, 3L);
>
> }
>
> I have tried compiling this with g++ 3.4.6:
> -----------------------------------------------------------
> A.cpp: In function `int main()':
> A.cpp:12: error: no matching function for call to `A<int>::A(int, long
> int)'
> A.cpp:3: note: candidates are: A<int>::A(const A<int>&)
>
> It fails on Comeau as well:
> --------------------------------------
> "ComeauTest.c", line 4: warning: template parameter "U" is not used in
> declaring the
>            parameter types of function template "A<T>::A"
>       template<class U>
>                      ^
>
> "ComeauTest.c", line 12: error: no instance of constructor "A<T>::A
> [with T=int]"
>            matches the argument list
>              The argument types that you used are: (int, long)
>       A<int> a(2, 3L);
>                ^
>
> I don't really understand why this should not work. Is it really
> necessary for typename U to play a role to select the correct
> constructor?

Yes, since it still has to know what type U will be for the particular
call. Even if it's seemingly unused, there are many reasons why it
might matter - for example, if you have a local static variable inside
that constructor.


-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
Pavel
5/11/2009 5:13:34 AM
On May 11, 7:38 am, "shri...@gmail.com" <shri...@gmail.com> wrote:
>
> template <class T>
> struct A
> {
>     template<class U>
You did not use the typename U.
>     A(int, long)
How about try "A(int, U)" ?
>     {
>     }
>
> };
>
> int main()
> {
>     A<int> a(2, 3L);
>
> }


-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
Linlin
5/11/2009 5:40:03 AM
shri314@gmail.com wrote:
> template <class T>
> struct A
> {
>     template<class U>
>     A(int, long)
>     {
>     }
> };
> 
> int main()
> {
>     A<int> a(2, 3L);
> }

Question: what is 'U' in the above constructor call? If you can't tell, how
should the compiler?

> I don't really understand why this should not work. Is it really
> necessary for typename U to play a role to select the correct
> constructor?

No, generally not. However, if the type can not be inferred from the
parameters, it must be given explicitly. I haven't tested it, but I would
try

  A<int> a<...>(2, 3L);

...of course substituting '...' with some type.

Notes:
1. I don't think it matters in any way that A itself is a template, only
that the constructor is one.
2. The above solution sure works for a function:

   template<typename T> T default_value() { return T(); }
   // doesn't compile, T is unknown
   default_value();
   // works
   default_value<float>();

Uli

-- 
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932


      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
Ulrich
5/11/2009 8:40:51 AM
On May 11, 4:38 am, "shri...@gmail.com" <shri...@gmail.com> wrote:
> Is this legal C++03 code:
>
> template <class T>
> struct A
> {
>     template<class U>
>     A(int, long)
>     {
>     }
>
> };
>
> int main()
> {
>     A<int> a(2, 3L);
>
> }
>
> I have tried compiling this with g++ 3.4.6:
> -----------------------------------------------------------
> A.cpp: In function `int main()':
> A.cpp:12: error: no matching function for call to `A<int>::A(int, long
> int)'
> A.cpp:3: note: candidates are: A<int>::A(const A<int>&)
>
> It fails on Comeau as well:
> --------------------------------------
> "ComeauTest.c", line 4: warning: template parameter "U" is not used in
> declaring the
>            parameter types of function template "A<T>::A"
>       template<class U>
>                      ^
>
> "ComeauTest.c", line 12: error: no instance of constructor "A<T>::A
> [with T=int]"
>            matches the argument list
>              The argument types that you used are: (int, long)
>       A<int> a(2, 3L);
>                ^
>
> I don't really understand why this should not work. Is it really
> necessary for typename U to play a role to select the correct
> constructor?
>

Misconception:
Whenever we define any template function with same the name as that of
class, is a constructor.

Reality:
No that is not constructor. Constructor can never be template.

Reason:
For any specific class constructor is remain same

Here for A<T> [T=int] we can have several function template<class U> A
(int, long) for [U=Any type].

But we instantiating object from A<T> [T=int] with parameter as if
this class has such parameterized constructor. But in reality this
class has only two constructor default and copy constructor which
compiler given.


-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
mail
5/11/2009 9:40:01 AM
On May 11, 8:40 pm, Ulrich Eckhardt <eckha...@satorlaser.com> wrote:
> shri...@gmail.com wrote:
> > template <class T>
> > struct A
> > {
> >     template<class U>
> >     A(int, long)
> >     {
> >     }
> > };
> >
> > int main()
> > {
> >     A<int> a(2, 3L);
> > }
>
> Question: what is 'U' in the above constructor call? If you can't tell,
how
> should the compiler?
>
> > I don't really understand why this should not work. Is it really
> > necessary for typename U to play a role to select the correct
> > constructor?
>
> No, generally not. However, if the type can not be inferred from the
> parameters, it must be given explicitly. I haven't tested it, but I would
> try
>
>   A<int> a<...>(2, 3L);
>

First - thanks for answering my question. It is correct that compiler
can't tell what U is, but there seems to be no way to specify it
explicitly either. I have tried the code above - it turns out to be a
syntax error. I even unsuccessfully tried other combinations of
disambiguation with "template" keyword for disabiguation.

A<int> a<char>(2, 3L);

A.cpp: In function `int main()':
A.cpp:12: error: expected initializer before '<' token

Neither does this:
A<int>::A<int> a<char>(2, 3L);

Neither does this:
A<int>::template A<char> a(2, 3L);

And some more that I have not listed here.

> ..of course substituting '...' with some type.
>
> Notes:
> 1. I don't think it matters in any way that A itself is a template, only
> that the constructor is one.

This is true.

> 2. The above solution sure works for a function:
>
>    template<typename T> T default_value() { return T(); }
>    // doesn't compile, T is unknown
>    default_value();
>    // works
>    default_value<float>();
>

This sure works as expected for functions.

> Uli
>
> --
> Sator Laser GmbH
> Gesch�ftsf�hrer: Thorsten F�cking, Amtsgericht Hamburg HR B62 932
>


-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
shri314
5/11/2009 3:00:37 PM
shri314@gmail.com wrote:
> On May 11, 8:40 pm, Ulrich Eckhardt <eckha...@satorlaser.com> wrote:
>> shri...@gmail.com wrote:
>>> template <class T>
>>> struct A
>>> {
>>>     template<class U>
>>>     A(int, long)
>>>     {
>>>     }
>>> };
>>>
>>> int main()
>>> {
>>>     A<int> a(2, 3L);
>>> }
>> Question: what is 'U' in the above constructor call? If you can't tell,
> how
>> should the compiler?
>>
>>> I don't really understand why this should not work. Is it really
>>> necessary for typename U to play a role to select the correct
>>> constructor?
>> No, generally not. However, if the type can not be inferred from the
>> parameters, it must be given explicitly. I haven't tested it, but I would
>> try
>>
>>   A<int> a<...>(2, 3L);
>>
> 
> First - thanks for answering my question. It is correct that compiler
> can't tell what U is, but there seems to be no way to specify it
> explicitly either. I have tried the code above - it turns out to be a
> syntax error. I even unsuccessfully tried other combinations of
> disambiguation with "template" keyword for disabiguation.

Judging by the following posts, it seems as if you may be there a long
time trying to find a way that works:

http://learningcppisfun.blogspot.com/2007/02/constructor-templates-and-explicit.html
http://www.cpptalk.net/how-do-i-pass-explicit-template-arguments-to-a-templated-con-vt11726.html

The relevant bit (from the first page) is:

"Here is a note from the C++ standards 2005 draft that is quite
self-explantory: (section 14.8.1 paragraph 7)

[NOTE]

[ Note: because the explicit template argument list follows the function
template name, and because conversion member function templates and
constructor member function templates are called without using a
function name, there is no way to provide an explicit template argument
list for these function templates. �end note ]"

Regards,
Stu

> A<int> a<char>(2, 3L);
> 
> A.cpp: In function `int main()':
> A.cpp:12: error: expected initializer before '<' token
> 
> Neither does this:
> A<int>::A<int> a<char>(2, 3L);
> 
> Neither does this:
> A<int>::template A<char> a(2, 3L);
> 
> And some more that I have not listed here.
> 
>> ..of course substituting '...' with some type.
>>
>> Notes:
>> 1. I don't think it matters in any way that A itself is a template, only
>> that the constructor is one.
> 
> This is true.
> 
>> 2. The above solution sure works for a function:
>>
>>    template<typename T> T default_value() { return T(); }
>>    // doesn't compile, T is unknown
>>    default_value();
>>    // works
>>    default_value<float>();
>>
> 
> This sure works as expected for functions.
> 
>> Uli
>>
>> --
>> Sator Laser GmbH
>> Gesch�ftsf�hrer: Thorsten F�cking, Amtsgericht Hamburg HR B62 932


-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
Stuart
5/12/2009 2:17:32 AM
On May 11, 6:40 pm, mail....@gmail.com wrote:
> On May 11, 4:38 am, "shri...@gmail.com" <shri...@gmail.com> wrote:
>
>
>
> > Is this legal C++03 code:
>
> > template <class T>
> > struct A
> > {
> >     template<class U>
> >     A(int, long)
> >     {
> >     }
>
> > };
>
> > int main()
> > {
> >     A<int> a(2, 3L);
>
> > }
>
> > I have tried compiling this with g++ 3.4.6:
> > -----------------------------------------------------------
> > A.cpp: In function `int main()':
> > A.cpp:12: error: no matching function for call to `A<int>::A(int, long
> > int)'
> > A.cpp:3: note: candidates are: A<int>::A(const A<int>&)
>
> > It fails on Comeau as well:
> > --------------------------------------
> > "ComeauTest.c", line 4: warning: template parameter "U" is not used in
> > declaring the
> >            parameter types of function template "A<T>::A"
> >       template<class U>
> >                      ^
>
> > "ComeauTest.c", line 12: error: no instance of constructor "A<T>::A
> > [with T=int]"
> >            matches the argument list
> >              The argument types that you used are: (int, long)
> >       A<int> a(2, 3L);
> >                ^
>
> > I don't really understand why this should not work. Is it really
> > necessary for typename U to play a role to select the correct
> > constructor?
>
> Misconception:
> Whenever we define any template function with same the name as that of
> class, is a constructor.
>
> Reality:
> No that is not constructor. Constructor can never be template.
>
> Reason:
> For any specific class constructor is remain same
>
> Here for A<T> [T=int] we can have several function template<class U> A
> (int, long) for [U=Any type].
>
> But we instantiating object from A<T> [T=int] with parameter as if
> this class has such parameterized constructor. But in reality this
> class has only two constructor default and copy constructor which
> compiler given.
>

Yes and no...

Of course a constructor *can* be a template like here (at least I have
never seen that fail - on a lot of compilers):

//----------->>>
template <class T>
struct A
{
  int a;
  template<class U>
  A(T t, U u)
  : a( t+u)
  {
  }
};

int main()
{
  A<int> a(2, 3L); // *implicit* constructor template call works
  return a.a;      // will return 5
}
//<<<-----------

What will not work is an *explicit* template constructor call like
//-----------
// A<int><long> a(2, 3L);
// A<int> a<long>(2, 3L);
// A<int> a.A<long>(2, 3L);
// ... or whatever idea else one might have
//-----------

Yes: not everything "look alike" is a real constructor.


-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
jaybus56
5/12/2009 6:27:21 AM
Stuart Golodetz wrote:
> [ Note: because the explicit template argument list follows the function
> template name, and because conversion member function templates and
> constructor member function templates are called without using a
> function name, there is no way to provide an explicit template argument
> list for these function templates. —end note ]"

Thanks for setting that clear, I wasn't sure about it. Anyway, the obvious
workaround is to use a function instead:

   class A {
     template<typename U>
     static A create(int, long) {
        // ...
     }
   };

   A a = A::create<float>(42, 0L);

HTH

Uli

-- 
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932


      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
Ulrich
5/13/2009 9:12:01 AM
Reply:
Similar Artilces:

Auto-correct? Auto-wrong, more like!
One annoying feature of my Treo 680 is that it thinks it knows how to spell better than I do. For example, if I write 'hse' in my calendar, or in someone's address, it 'corrects' it to 'she'. This is of course silly, as hse is an abbreviation both for 'house' and for 'health and safety executive'. Is there any way of turning this stupid mis-feature off? -- David Cantrell | London Perl Mongers Deputy Chief Heretic No virus was found in this outgoing message as I didn't bother looking ...

Newbie: Inserting Debug Statements into Lisp Code
Is there a convenient way of inserting debug/format statements into a form that does not sequence its statements like progn? For example, (cond (cond1) (do-action-A some-variable) (cond2) (do-action-B some-other-variable) t (default-action)) So let's say that do-action-A is not behaving correctly because some- variable has an unexpected value. The only way I know to observe the value of the variable before do-action-A is invoked is with a format statement. And to do that I have to rip apart my cond into this: (cond (cond1) (progn ...

wrong ip of smtp host in mails sent
Hello, my mailserver sits on a host with two virtual network interfaces. Although DNS lookup and reverse lookup of the mailservers hostname work as expected, mails sent show the other ip in the header (received from mailhost.com a.b.c.e instead a.b.c.d). Because I want to use spf, this makes the mail spam, if spf is checked. It seems as if smtp always tries to connect via the primary network interface. I tried: DAEMON_OPTIONS(`Name=IPv4, Addr=a.b.c.d, Family=inet')dnl but this didn't help either. Any clues? Greetings Neven Luetic > my mailserver sits on a host with two virtu...

is it a wrong algorithm?
Hi all. What's the problem with this algorithm?I think I 've got a infinite loop so I set loop checker for checking but the problem already existed. Thanks in advance. ff=0; 'double frame number count=1; 'counter for saving image loopchecker=0; 'double lk=grayimages(:,:,30); '240x320x897 uint8 m=size(lk,1); n=size(lk,2); background_image=uint8(zeros(m,n)); '240x320xuint8 bkgrndStorage=uint8(zeros(m,n,(floor(.05*numframes)+1))); f=uint8(zeros(1,256)); while ff<896 tic for x=1:n for y=1:m for fr=round((ff/2)+1):3:round((ff/2)+300) if ((r...

What am I doing wrong?
In(1) SeriesCoefficient[1/(1-x),{x,0,n}] Out(1) (-1)^n*Binomial[-1,n] Next, In(2) FunctionExpand[(-1)^n*Binomial[-1,n],Assumptions->Element[n,Integers]] OUt(2) ComplexInfinity In(3) Table[(-1)^n*Binomial[-1,n], {n,-2,2}] Out(3) {0,0,1,1,1} Incidentally, FullSimplify in place of FunctionExpand yields the same result, ComplexInfinity. I wonder if this misleading answer is a result of FunctionExpand and FullSymplify resorting to the Gamma Function for the simplification? Is this a bug or a feature? Thanks, Jack Jack L Goldberg 1 wrote: > ...

Re: need help,need fast adaptive QR-RLS algorithm matlab code!
i m from S.R.K.R. Engg. college from Andhra University. i need matlab code for QR-RLS algorithm please help me as quickly as possible regards, naresh hello friends, Do not be like stupids. Once it is your project that fetches some in your career, put some efforts to write code. For that, if you need help ask the guidenace from the Guru's. Before coming to this groups , search some thing in Google. Best Regards, Sathish Athreya "naresh" <ursnaresh_p@yahoo.co.in> wrote in message news:jjv4aws3xevn@legacy... > i m from S.R.K.R. Engg. college from Andhra Un...

Where did Scheme go wrong?
X-No-archive: yes Where a supposedly learned standards committe decided that ALL Schemes(tm) should not equate #F with (). I'm going back to LISP's simplicity. Regards, anonymous language design author anonymous@netscape.net wrote: > Where a supposedly learned standards committe decided that ALL > Schemes(tm) should not equate #F with (). I'm going back to LISP's > simplicity. Regards, anonymous language design author Oh look, a blatant anonymous troll. How cute. Paul Paul F. Dietz wrote: > anonymous@netscape.net wrote: > >> Where a supposedly...

xhtml1 strict ie6 wrong table height
(1602 bytes testcase): http://www.hot.ee/idaliiga/testcases/ietableheight/iebrokenstrictmode-tableheightincell.htm How can I force IE6 to render my #myinnertable as tall as the surrounding outer tables cell height? It would also positive if it would honor the style classes ..short{height:30px;} ..dynamic{height:auto;} Cant remove the doctype delcaration, it must be there. How can it the "shrinkwrapped" table be made 100% tall as I want to? ...

What is wrong
Hello I am trying to learn Lisp. I wrote a function like this : (defun topla(deger) (cond ((<= deger 0) 0) (T (+ deger (topla (- deger 1)))))) I tried to sum total (my english is inadequate excuse me, you can see what the code trying to do.) For example if I give 3-15000 etc. it works. But when I give for example 25000 it is giving error. It is giving "stack overflow". How can I make this with no error ? Which controls must be added to code ? I want to use recursion. Thanks. ttk.lisp@gmail.com =E0=B9=80=E0=B8=82=E0=B8=B5=E0=B8=A2=E0=B8=99: >...

Canvas
Hi there,=20 I have the following script (Tk 8.6, same behavior for 8.5): set c [canvas .c] pack $c $c create rectangle 10 10 110 110 -fill #cccccc -tags block $c create rectangle 150 10 250 110 -fill #cccccc -tags block $c bind block <Enter> [list ControlsShow $c %x %y] $c bind block <Leave> [list ControlsHide $c %x %y] proc ControlsShow {c x y} { # # c - path to the canvas # x - x-coordinate of the event # y - y-coordinate of the event # set item [$c find closest $x $y] lassign [$c bbox $item] x1 y1 x2 y2 set x [expr {$x1 + 50}] set y [expr {$y...

help,a regular text file how to sql 2000 table code ?
help,a regular text file how to sql 2000 table code ? i have a text file as follow, line with ��|��and {LF}, 8|-000000186075919.|+000000000387820.|2008-03-31|20010423| 9|-000000000003919.|-000000000123620.|2008-03-31|20010123| 8|-000000018623419.|+000000000381230.|2008-05-30|20010423| i want to sign char(1)��year decimal(18,3) , month decimal(18,3), trandate smalldatetime��update smalldatetime��after to sql table is as follow, sign year month trandate update 8 -186075919.000 387820.000 3/31/2008 4/23/2001 9 -3919.0...

Error Code: 1073
&nbsp; I am developing a panel that is seperated from the hardware through an abstarct layer that utilizes TestStand. &nbsp; I am traversing a string&nbsp;array that TestStand delivered from a static database. I use&nbsp;a "TestStand Get Property Value.vi" to retrieve the object property "GetNumElements" value, to loop through the link list retrieving other properties found in the database to populate a cluster of analog controls. &nbsp; I get the following error generated in the TestStand sequence report. I know little&nbsp;about TestStand, and I ju...

Reed-Solomon correcting code
Hello. I have to do coder end decoder of Reed-Solomon code in vhdl language. I have coder and I can show it, but I have problem with decoder. Can somebody help me? More information I can send priv. Regards, Wilq ...

Code Review Request: Newbie C programmer
Hi gang, My job description recently changed to include C coding, so I've got to speed learn C. :-) Anyway, I would be grateful for comments of this little exercise I hacked up. First, Splint 3.1.1 --- 13 Oct 2004, warns (among other things): 6502dis.c:21:5: Variable exported but not used outside 6502dis: address ... 6502dis.c:33:5: Function exported but not used outside 6502dis: getbyte ... and so on. My question is, should I care about these warnings? Or, better yet, how do I fix them? (The "other things" it complains about is unistd.h, ...

Re: [Info-Ingres] floor() and ceil()...wrong, wrong, wrong!
This is a multi-part message in MIME format. --------------010701030607080200090000 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Hi Martin, that's just the fun thing about computers: they do what you tell them to do, but not always what you want them to do :-) Have a sunny spring day, J�rgen -------- Original-Nachricht -------- Betreff: Re: [Info-Ingres] floor() and ceil()...wrong, wrong, wrong! Datum: Thu, 8 Apr 2010 13:21:18 +0100 Von: Martin Bowes <martin.bowes@ctsu.ox.ac.uk> Antwort an: Ingres and rela...

Anonymous hacker is wrong wrong wrong
Released an incomplete version of Counter-Strike: Condition Zero - hey dildo! Guess what? It just went gold! Jonah Falcon Jonah Falcon <jonahnynla@mindspring.com> wrote: > Released an incomplete version of Counter-Strike: Condition Zero - hey > dildo! Guess what? It just went gold! and this makes him "wrong" how...? "i own a yacht" <me@privacy.net> wrote in message news:bm3q97$iia9r$1@ID-204009.news.uni-berlin.de... > Jonah Falcon <jonahnynla@mindspring.com> wrote: > > Released an incomplete version of Counter-Strike: Condition Zero -...

parsing python code
I need to parse a Python file by breaking it into blocks matching indentation levels so that function definitions, for loops, and classes are kept together as blocks. For example, if I have something like from scipy import* from pylab import* g = .6 Input_freq = 10.0 def load_data(path): data = loadtxt(path, skiprows = 1) t = data[:,0] Input = data[:,1] Output = data[:,2] return t,Input,Output def time_plot(x,y,n = 1): figure(n) clf() for curx, cury in zip(x,y): plot(curx,cury) title('Time Plot') xlabel('time') ylabel('f(t)') legend(['Input',&...

Re: [Q] Simulink C code generator #2 #2
> Does the C generator (autocode) for Simulink require > the Matlab > libraries? > Does the code generated need a specific compiler or > does it produce > ANSI standard C? (For a PC with Borland C++ v5.) > > I would like to run a model generated in Simulink as > a stand alone > program on a computer without Matlab/Simulink. Will > the C code > generator allow this, and would I need to obtain > Matlab libraries? > > Thanks in anticipation for your help and apologies if > I've missed the > obvious answer in FAQ. > > Peter Cowley &g...

Wrong standard BoundingBox in terminal postscript eps
Hello, Recently I noticed a problem with the standard BoundingBox of the "terminal postscript eps". In the example below, the lower part of the letter "g" is already outside the BoundingBox. Although fixbb may be used to correct the box, it also changes all other borders leading to inconsistent left and right borders if applied to many files. Is there any known solution to automatically correct these problems? Is this behaviour considered to be a bug in gnuplot? I am using gnuplot version 4.2.3, but have also tested versions 4.2.0 and 4.0.0. Regards, J...

Data Recovery SOURCE CODE ( SOURCE CODES of Professional Data Recovery Software ) #6
Hi, I am a Data Recovery Specialist and Professional Data Recovery Software Developer in New Delhi. I've placed the Complete SOURCE CODE of One of my Data Recovery Software for Sale (for Educational Purpose) on the following link of my website: http://www.datadoctor.biz/3.htm I'd like to inform you that I am the author of World's First Book on Professional Data Recovery Programming titled, "Data Recovery with & without Programming". You can see the contents of the book on following link of my website: http://www.datadoctor.biz/author.htm I also have many other Pr...

how to convert m file to c code #2
Hi, I have a matlab(m) file which solve a three non linear equation. the equation are full of trigonometrical functions. i m getting the output in terms of degrees. i used mcc -m (filename) to conver the m file to c code. but whn i open the main.c file of my program and execute it, it shows mclmcr.h file is missing (thr is no such file available in the directory) i need the procedure to do conversion from m file to c code. can anyone help on this. thanks On Jul 15, 6:39 am, Nathan <jaganathan.ranganat...@gmail.com> wrote: > Hi, > > I have a matlab(m) file which solve a t...

Would someone tell me if I'm on the wrong track?
I'm trying to build a new memory allocation scheme for my postscript interpreter to satisfy these requirements: % pointer + offset + size + short tag <= 32bits % 'garbage-collection'-ready (structure the heap for easy iteration) % all memory is in one region for easy restore from disk So I've written a prototype where the "pointer" is an index into an extendable address table stored in the heap itself. And it seems to work! But I don't trust it, you know? I'd appreciate any comments the experts here could offer. One apology. I'm trying to use mmap if...

Poor WronG. Wrong again.
http://www.bbc.co.uk/news/business-17434328 For a company "failing" they sure do have a lot of cash.... and people CHOOSE to buy their products DESPITE this MS "monopoly". ,---- | At the end of last year, Apple revealed it had $97.6bn in cash. It | expects to use $45bn over the next three years. `---- Can there be a dumber "poaster" than WronG (with the obvious exceptions of the chrisv turd, Dumb Willy "me too" Poaster and that cretin who's never right - Gortard). ...

help: mixing java code with javacc/jjtree code
Hi, I would really appreciate help on this.. I'm trying to write a production that takes in a boolean flag, and based on the flag it should match with different productions .. how can I mix the java code that checks the flag, with the javacc code? I want to do what is logically represented by the production below, but it doesn't compile because you can't seem to embed an open "{" or "}" within the area for JAVACODE. void production(boolean flag) : {} { { if(flag) { } childProductionA() childProduction...

Arithmetic coding problem
Hi. I implemented the arithmetic integer coding algorithm using some free source code, in Visual C++. I made it work on strings, not on files. First I make a string from a file and then invoke a the encode(string) method. The problem is that it doesn't work on all files, in extension on all strings... If the file contain all 256 characters the probability it doesn't work is big. What could be the problem? Here is some code: void AC::reset(){ res=""; for(int i=0;i<256;i++) freq[i]=1; contor=0; mBitCount = 0; mBitBuffer = 0; mLow = 0; mHigh = 0x7FFFFFFF; ...