473,544 Members | 120 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.
1
1,651
thread by: ree | last post Jul 19 '05 by: Victor Bazarov
Most books don't go into how to code one to many relationships. They just seem to basically cover one to one. Can some one point me out how to guide me to a link on the net where I can get more information. By they way I found a book that covered a bit on it but i am confused with ...UnboundedSetByValue in the following examples shown in the...
7
1,651
thread by: diadia | last post Jul 22 '05 by: chris
#include <iostream> using namespace std; void main() { char *a; a = new char; cin >> a; cout << a; }
9
1,651
thread by: SK | last post Jul 22 '05 by: Mike Wahler
I have a c++ program that spans multiple files. How do I call member functions in one file from the other? Thanks, Santosh
1
1,651
thread by: Shalini | last post Jul 22 '05 by: Jack Klein
Hi , I am trying to call routines form IMSL library form VisualC++. It compiles and builds everything,but when I try to run it I get an error cstat.dll not found. What could be wrong? Thanks Shilpi
28
1,651
thread by: Intermouse | last post Jul 22 '05 by: stu
I have recently purchased an aspi wrapper control for vb. I haven't had much experience with hex and memory addresses and that's my problem. The piece of code that baffles me is: With ASPI1 .HostAdapter = 0 .SCSIID = 4
2
1,651
thread by: Mathieu Malaterre | last post Jul 22 '05 by: Mathieu Malaterre
Hello, I could find in the C++ definition that: delete NULL (delete 0) is perfectly valid. But I couldn't find the same thing for delete... Thanks Mathieu
1
1,651
thread by: Reinhard Abel | last post Jul 22 '05 by: John Harrison
I have an old C-Program written with Borland 2.0. Now I like to do some changes, but I get lot of syntax Erros with my new computer. When I use the old mashine ( 286 ) it works perfectly but I can not use the program on the new computer. It will not run.( Runs under MS-DOS) Is there any one how can help me? I also used newer Compilers but...
0
1,651
thread by: Arne Claus | last post Jul 23 '05 by: Arne Claus
I've got a tricky problem here. I try to create an object-hierarchie, based on a template base class like template <class T> class Node { addChild(Node<T> *) =0; // the Node-Container wil be defined in the base classes }; The problem is, that the classes derived from Node represent different forms of hierarchies, which all can use a...
3
1,651
thread by: Grahamo | last post Sep 26 '05 by: Greg
Hi, I have a question that pertains to Templates and link time. This is totally for my own understanding and to correct what's obviously an erroneous view of things on my behalf; Lets say I have; // main.cpp
6
1,651
thread by: lgn | last post Nov 13 '05 by: Alex
I have test the following program, why the result is not 0 2 4 but 0 2 3? Can someone tell me why the same macro produce different result? Thanks! #include <stdio.h> #define max(a,b) ((a)>(b) ? (a): (b)) test() { printf("%d\n", 1); }
9
1,651
thread by: marty | last post Nov 14 '05 by: Roger Leigh
Folks, Any suggestions for a generic library to do linked lists, hashes and the sort. I have tried libds and it seems to do my job ok. It will be used in closed source software (not my choice). I think from the license with libds that is ok. If you have any suggestions on a better library to use then please let me know.
2
1,651
thread by: mac_ferrari1975 | last post Jan 15 '06 by: Daniel T.
Hi all, Consider the situation. I am designing class library and I have a class A. I derived class B and class C from A but derivation is not virtual. for exa. class A {}; class B : public A {}; class C : public A {};
2
1,651
thread by: Bit byte | last post Apr 22 '06 by: peter koch
I have a simplistic exception class like so: class CommException { public: CommException(const char *err){ strncpy(msg,err,ERR_MSG_LEN); } virtual ~CommException(){;} void erase(void) { memset(msg,'\\0',ERR_MSG_LEN); } const char* report(void) { return msg ; } private:
5
1,651
thread by: Vincent RICHOMME | last post May 5 '06 by: red floyd
Hi, My goal is to display in a graphical application properties of my objects. To do that I am using on windows a graphical control (MFC) called EPropCtrl with the following definition : class IPropertyHost {
4
1,651
thread by: mathieu | last post May 29 '06 by: boaz_sade
Hello, I would like implement a nice way to work around the array of references issue in C++. What do usually people do ? Do you maintain a separate factory/pool of elements as part of the API ? So in my example (*) I would need to either : 1. allocate on the heap (and then fragment memory): void fill(A *array) {
2
1,651
thread by: samcomm | last post May 31 '06 by: Phlip
Hello All.. I'm a student and studing C++. Could you tell me what can I develop in C++? I konw that C++ can develop almost programs. Just I want to know....
3
1,651
thread by: arnuld | last post Jul 24 '06 by: arnuld
Hello, i posted this question more than 1 month ago but did not get any answers, so i am posting it again (1). with advice form archives @ alt.comp.lang.learn.c-c++, comp.lang.c++, comp.lang.c++.moderated & ACCU.org & i came to the following conclusion for learning c++: "Accelerated C++" by Koenig & Moo
1
1,651
thread by: metiu | last post Sep 19 '06 by: Jack Klein
Hi all, maybe it's an old question, but I couldn't find an answer... let's say I have this kind of directory structure for project foo: /foo/includes/mod1.h (exported by mod1) /foo/includes/mod2.h (exported by mod2) /foo/mod1/file1.c /foo/mod1/file1.h (exported by file1)
4
1,651
thread by: Diego Martins | last post Oct 9 '06 by: Diego Martins
Hi all! I am doing a crude investigation of memory leaks in objects created by external libraries. Since I don't have access to the source code, I can't tell if an object are freeing its resources properly during destruction. For now, I need a portable function that can tell me the available free store memory. With that, I can do things...
2
1,651
thread by: Hooyoo | last post Dec 31 '06 by: noone
Hi, all, If I know URL, how can I download that web page? What API can I use? Thanks.
1
1,651
thread by: vsgdp | last post Jan 9 '07 by: Mike Wahler
Hi, #include <iostream> int main() { std::cout << float() << std::endl; } Outputs 0, is this standard or implementation defined? Is float() a
10
1,651
thread by: gallerto | last post Mar 3 '07 by: gallerto
Hello, I woul like to know If there is any way to allocate two positions of memory for a pointer to double but in such way that this positions are not consecutive. What I really whant is to have one vector of two components where I can get the first component with the index 1, it means: VECTOR but to get the second component I don't want to...
1
1,651
thread by: RKtechhead | last post Feb 28 '07 by: horace1
This is the program I have written to display 10 tictactoe fields but using 10 strings input by a 2d array. For some reason with mine I'm getting the wrong data output. Could someone take a look at my tttfunction() and tell me if I screwed it up rather badly or not? (I'm struggling my way along through this one). #include<iostream> using...
7
1,651
thread by: arnuld | last post Mar 10 '07 by: santosh
exercise: counts spaces, tabs and newlines in the input for that, Richard Heathfield has created a C programme at his answers- page: http://users.powernet.co.uk/eton/kandr2/krx108.html i have also created my programme which runs fine. i want to have some comments on my programme, in comparison with Richard's.
0
1,651
thread by: Andreas Schmitt | last post Apr 11 '07 by: Andreas Schmitt
I wrote a small timer class for use in a graphics engine I am working on for teaching myself. The small time based animations I tried with it seem to work fine but displaying the frame rate I noticed a certain "drop in framerate" to appear at regular intervals without any apparent reason. Here's the code I'm using: class BasicTimer

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.