473,545 Members | 319 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C / C++ Forum

C / C++ programming language - Get answers to questions about compilers, visual C++, templates, namespaces, classes, data structures, OOP (object-oriented programming), inheritance, data types, exceptions, Standard Template Library (STL) and the C Standard Library.
2
2,134
thread by: Dave | last post Jul 22 '05 by: Ioannis Vranos
Hello NG, Can anybody fathom the purpose of an explicit copy constructor? On page 232 of the Josuttis STL reference, I see a reference to such. How could you ever need to supress the possibility of an implicit conversion from type T to type T? Such an implicit conversion could never occur because you're already of the required type! ...
2
2,260
thread by: Exits Funnel | last post Jul 22 '05 by: Exits Funnel
Hello, I've inherited a bunch of code which was written on windows and makes frequent calls to _wtol( ) which converts a 2 byte char array to a long integer. I'm pretty sure it is a Microsoft extension. I'm porting the code to Linux (g++) and I can't figure out how to replace it. It seems I should be able to use the std::string class to...
2
1,619
thread by: akickdoe22 | last post Jul 22 '05 by: rossum
i could really use help finishing this addition program. I'm stuck on the part that allows you to add any two large integers,up to 100 digits,(pos+pos, neg+neg, and pos+neg). could use hints ideas code anything for neg+pos addition. CODE SO FAR: class INT { int digits; char sign; public:
2
342
thread by: Mark | last post Jul 22 '05 by: Jonathan Turkanis
can someone clear up the following for me. I've read somewhere that auto_ptrs cannot be used with standard containers as they don't meet the requirements for equivalence. That is "copies are not equivalent". First what does that mean. I know this much: auto_ptrs maintain an ownship flag which is set/unset during a copy
2
2,063
thread by: Vince | last post Jul 23 '05 by: Richard Herring
I have a very specific problem to solve but I cannot find a data structure for it. I don't know if I am posting on the good newsgroup but I cannot find a software.design group. I would like to declare a smart structure initialized via a XML file. The goal of this structure is to store data from a smart card. My XML file describes the file...
2
1,232
thread by: Dennis Schulz | last post Jul 22 '05 by: Thomas Matthews
Hi this is my problem: enum num{Jan=1, Feb=2, Mar=3, Apr=4, May=5, Jun=6, Jul=7, Aug=8, Sep=9, Okt=10, Nov=11, Dec=12}; std::string month = "Dec"; num n1 = Dec; //this is working num n2 = static_cast<num>(month); //this is not working
2
1,564
thread by: Dave | last post Jul 22 '05 by: Sebastian Redl
Josuttis states that I may not throw an exception of type exception or of one of the standard exception types used for language support. Where in the Standard am I forbidden from "throw exception();"? Thanks, Dave
2
5,243
thread by: sprotty | last post Jul 22 '05 by: wittempj
I'm writting some classes that deal with XML, and they need to be able to convert from strings to doubles and back. The problem is they should only accept/output strings valid in XML, that is using the '.' as the decimal separator (ie '123.12'). Ive been using atof etc, but as soon as you install on a foregin machine, you start getting...
2
2,374
thread by: Alex Vinokur | last post Jul 22 '05 by: Alex Vinokur
------ foo.cpp ------ #include <iostream> using namespace std; int main() { #define FACTOR 10 for (unsigned long array_size = 1; ; array_size *= FACTOR) { int* p = new int;
2
4,719
thread by: Someonekicked | last post Jul 22 '05 by: Mike Wahler
I want to use functions written in c++ in a VB program. I know that i should write a dll file to do that. I made a search on google, and was not much help, found two tutorials that did not work when i tried them. I have Microsoft visual C++ 6.0, if this is not the right group for this question, plz tell me what group can help if you know...
2
4,379
thread by: Sanyi | last post Jul 22 '05 by: Jerry Coffin
Hello, I've did some some numerical programs in C/C++ before, but decided to use STL to write neater code. Then again I don't want to give up speed so I have a couple of questions. Apparently the recommended structure for a fast numeric code is valarray. Alas, from the sparse documentation in the books I looked into and a google search it...
2
1,128
thread by: Flzw | last post Jul 22 '05 by: Martin Magnusson
I have a class declared in a header file that has a static vector variable which I get unresolved external errors when I try to access it, I understand static members should be declared in cpp but how is it done in this case? Couldn't find anything about that, hope I am clear enough, thanks for any help.
2
2,539
thread by: Andreas Andersen | last post Jul 22 '05 by: Gernot Frisch
Hi I have been using valgrind to debug a program I have written in C++ and it has been very helpful in eliminating memory errors/leaks. However, I just recently discovered a bug and from what I can see it looks like some kind of memory problem. However, when I run it through valgrind no errors are reported and the bug seems to be gone! I...
2
368
thread by: puzzlecracker | last post Jul 22 '05 by: Tim Slattery
Why is "new" a C++ language-level construct while "malloc" is a library function?
2
2,374
thread by: frantz | last post Jul 22 '05 by: frantz
Maybe a stupid question: ------------------------ Is there ihneritance for conversion operator? If yes or no, what is the reason(s)... Thanks for your help. Example: -------- class A {
2
320
thread by: puzzlecracker | last post Jul 22 '05 by: Joseph Turian
Do you see any problems with the following algorithm that converts Link list to Binary Search tree. Can you think of a better solution? node* LLtoBST(node *head, int num) { node *root=head; int i, mid=(num+1)/2; if(!head) return NULL;
2
992
thread by: Adie | last post Jul 22 '05 by: Mike Wahler
What is a pointer? Can I have less of them in .NET?
2
1,650
thread by: jrefactors | last post Jul 22 '05 by: Tom Dyess
I always heard people saying enterprise application (large-scale business application), but I never heard people say enterprise system. Are they the same? or they are different? My understanding is that enterprise system consists more than 1 enterprise applications. pleae advise. thanks!!
2
1,670
thread by: Allen R. Cha | last post Jul 22 '05 by: Mike Wahler
I'm developing FTP Client. but i have a problem. System Env. : Server : wow linux, kernel ver 2.4.x client : Windows XP Home edition. I'm developing FTP Client Application. but I got error message "550 no such file or directory". But i absolutly watch file i want to get in server. I don't know why... so i'm sad.
2
1,254
thread by: Matthieu Gallien | last post Jul 22 '05 by: matthias_k
Hello I maintain an old software that was developped since twelve years. I need to check for the best portability and the best maintainability. The idea is to write cleanest c++. So I want to check for the respect of the iso c++ of my code which originaly don't respect it. (It was first compile with gcc2.7.x) I made some modifications, but I...
2
10,413
thread by: Attila Feher | last post Jul 22 '05 by: Attila Feher
Hi all, I have not done much work around exceptions; and even when I do I avoid exception specifications. But now I have to teach people about these language facilities, so I am trying them out with gcc 3.4.2-mingw. I have tried the TCPL Spec.Ed. example of just adding std::bad_exception to the exception specification of a function...
2
1,153
thread by: crazee_cruzer | last post Jul 22 '05 by: rossum
Hi, I'm somewhat new to C++ on Linux (having used Java for a while) and I need to know where I can find the reference documents for C++ library functions, so that I can get going. I'm using the g++ compiler. Help would be greatly appreciated. Thanks, CC
2
1,348
thread by: kak3012 | last post Jul 22 '05 by: Jack Klein
Hi; Here is the main code and the function. I think it does not return the (char pIn) I might be mistaken a lot of place like returning a value, choosing right function type and so on. That is why I could not figure it by myself. Can anyone help me I am new to C++ functions.
2
2,185
thread by: Alray | last post Jul 22 '05 by: Martin Stettner
I need to send information through a USB port, so I can control certain machine on the other side. The data goes through a USB to serial cable, so I'm only interested in sending data (Though knowing how to receive it, is always a plus!). The thing is I've been searching for a USB API for VC++, and I can't seen to find any functions or...
2
2,012
thread by: mtp1032 | last post Jul 22 '05 by: Jack Klein
I need to be able to extract the values from an XmlRpcValue where I do not know in advance what the keys are, or how many exist. For example, suppose I have an XmlRpcValue, object, returned by some xml-rpc method, XmlRpc::XmlRpcValue xmlVal = some_xmlrpc_method(...); that when printed to std::cout, i.e., std::cout << xmlVal <<...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.