473,545 Members | 1,956 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
1,488
thread by: Xin Wang | last post Jul 23 '05 by: Sumit Rajan
In ansi c++, you can do something like template <class T> class vector<T> { protected: int a; int b; } class boundedVector<T> : public vector<T>
2
1,020
thread by: Tony Johansson | last post Jul 23 '05 by: Rolf Magnus
Hello Experts! I have this statement Student* john = michael; where the pointer john is pointing to the same class object that michael is pointing at. But now to my question.will the copy constructor for the Student class be called or any other constructor. Many thanks.
2
2,098
thread by: Tony Johansson | last post Jul 23 '05 by: Malte Starostik
Hello experts!! I have written a small program that I hope will run out of memory(just for testing) because i have deliberately removed the delete of the allocated memory but it will not run out of memory. So my question is can you see why not this program will run out of memory. It consist of three files these are start.cpp,test.h and...
2
1,458
thread by: Mark | last post Jul 23 '05 by: Ares Lagae
We have a particular software project where a minority of the function calls are taking up a majority of the cpu time. (they do a lot of geometric, trig and other functions related to vectors corresponding to tracks in 3d space) We think there's not much more that can be done to speed these functions up on the computer we have (or can...
2
1,556
thread by: Richard Clay | last post Jul 23 '05 by: Malte Starostik
It seems odd that there is (apparently) no way of telling the istream >> operator overloading for strings to NOT stop when it gets to the first space. What I want to do is this: string source("7 one two 5 fruit 3 tea 6 banana"); istringstream iss(source); int strLen; iss >> strLen; // get length of next string, 7 in first case
2
519
thread by: Tony Johansson | last post Jul 23 '05 by: Jason
Hello experts! Is it any difference if I instansiate object testobj of class Test as alternative (1) or (2). In this case I think it's the same thing. I'm I right. (1)Test testobj (2) static Test testobj main() {}
2
2,049
thread by: bithead | last post Jul 23 '05 by: bithead
How do you invoke a MSDOS program from C#.net program? system("dir"), shell("dir") don't work. What else is there?
2
16,137
thread by: Squid Seven | last post Jul 23 '05 by: Squid Seven
I have created a class that contains an instance of a second class. When i try to call a member function of the instance of the second class from a member function of the containing class, I get the following error message: Insufficient contextual information to determine type. I have generated the simplest sample I could come up with...
2
1,531
thread by: Pradyut | last post Jul 23 '05 by: George Faraj
I have made a program in which I'm trying to return the string in which the character is found. I'm doing this through pointers. I'm not able to figure out the correct way: printf("%s", *string);
2
2,690
thread by: Matthias Kaeppler | last post Jul 23 '05 by: Matthias Kaeppler
Hello, I am having trouble getting std::equal_range to perform as I wish, and I can't find my error. Here's the situation: I have a vector of pointers to filesystem path objects (a file list, basically). This vector is partitioned each time the file list was rebuilt into paths which are directories and paths which are not. The...
2
1,185
thread by: Brent Ritchie | last post Jul 23 '05 by: msalters
Hello, I have a problem that's really getting to me. I have an std::vector, and it holds pointers to classes. From these classes I need a refrence to the object that holds the vector, because it has the information needed to perform certain functions on the objects in the std::vector. for clarity I have an example. class A {
2
328
thread by: BigBrian | last post Jul 23 '05 by: BigBrian
I have some code, that resembles the following... class Foo { template < class T > Foo & operator << ( T const & t ) { ... } }; class AnotherClass {
2
1,489
thread by: max_sang | last post Jul 23 '05 by: max_sang
Hello I have a nasty problem... take a look at this code: struct Parser { Parser(const string& s) { ... tokenizes s into pieces... } template <class T> to(size_t idx); private: vector<string> tokens_; // holds the pieces of s };
2
3,818
thread by: ryan.fairchild | last post Jul 23 '05 by: ryan.fairchild
I have a problem I am trying to create a MyInt class to hanlde very large ints. Its for a class, therefore I can only do what the teach tells me. I want to be able to overload the insertion operator so that I can read in one digit at a time from the buffer and if the digit is 0 - 9 then put it into the dynamic array which stores each digit...
2
396
thread by: web1110 | last post Jul 23 '05 by: Thomas Maier-Komor
Hi y'all, I was playing with C++ and tried this program: #include "stdafx.h" #include <iostream.h> class prop { private:
2
2,235
thread by: Haro Panosyan | last post Jul 23 '05 by: Haro Panosyan
Suppose I have defined a templete function prototype in a header file and the body in .cpp file and created executable without actually calling the templete function. Now let say from that executable I am loading a shared object and executing(dlsym-ing) some f() function, which inside calls the templete function. (Of course the header file...
2
1,323
thread by: NoWonder | last post Jul 23 '05 by: Matthias Kaeppler
WHO can tell me how can i the structural things about calling a function via a pointer-to-function? thank you.
2
1,245
thread by: Andrew Bullock | last post Jul 23 '05 by: Mark P
Hi, I want to create a vector of templates, but I've come across a problem.... Here is a trimmed version of my template definition: template<class T>
2
2,468
thread by: sam++ | last post Jul 23 '05 by: sam++
Hi, I m looking for a C/C++ library provide SSH API functionality which are similar to the current version of openssh. I m running FreeBSD 5.4 and installed ACE+TAO from the Ports, but I found the ACE+TAO pkg is a bit overkill to only use this feature in the project. Thanks
2
1,356
thread by: armandotop | last post Jul 23 '05 by: Peter Jansson
I am writing a project for a boat rental. I have done the shell to spring off to other modules to satisfy the menu. I am stuck on getting the right script for userid and password. I have a text file called users.txt I would like to be able to get the file, have it read by the program, stored in memmory, validate the entry to match what's on...
2
3,322
thread by: Giulia Smith | last post Jul 23 '05 by: Giulia Smith
Anyone knows how to build (or a tutorial online) to build a small proxy server by myself. I need only to point it from a browser and print in a mxgbox the URL requested and loaded. Thank you. Giulia
2
2,468
thread by: bwilde | last post Jul 23 '05 by: JFalt
Hello, I've come across a problem and I am hoping that somebody can help me. Here is what I'd like to do: I would like to have a bunch of images and subdirectories in a certain directory (I know where the directory is with respect to where the program is running), and I want to be able to find out what the names of all of the images and...
2
1,231
thread by: Pelle Beckman | last post Jul 23 '05 by: Rolf Magnus
Hi, Reading X. Meng's post on embedded classes I came to think of a similar problem I found myself having. void GamestateToString(class GameApp::TGamestate); class GameApp { typedef enum { STATE_1,
2
1,512
thread by: flyaflya | last post Jul 23 '05 by: Andre Kostur
i use a class static member function to for_each: class t1 { static test(string s); } main() { list<string> slist; ...
2
1,480
thread by: Vulcan Fire | last post Jul 23 '05 by: Vulcan Fire
Hi Had this doubt really irking me for some time. For some obj of type say Obj. void fn(Obj o){ // do somethng }

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.