Google Answers Logo
View Question
 
Q: C++ template and cast controlled program flow ( No Answer,   0 Comments )
Question  
Subject: C++ template and cast controlled program flow
Category: Computers > Programming
Asked by: raspo-ga
List Price: $10.00
Posted: 02 Nov 2006 09:12 PST
Expires: 03 Nov 2006 00:13 PST
Question ID: 779440
I've got a problem with C++ templates i think. I'm a seasoned C++
coder myself, so i thought I'd be able to figure this one out, but no,
apparently i am less clevar than i had hoped... the source is here:
http://rafb.net/paste/results/7k7NCJ77.html

the problem is that i cannot find a general solution to the problem of
global constant strings being used as initialisers into the Typeless
class, they always come up as "unknown" type.

if you change "Typeless typeless6( "unsafe string" );" to "Typeless
typeless6( (const char*)"unsafe string" );", everything is fine, and
that's what I've been doing so far, but it feels cludgy.

I've tried templating out the [] with "template<int numChars> ...
const char[numChars]", but that doesn't seem to sign right to be
picked up.
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy