473,811 Members | 4,047 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.
5
5,426
thread by: sean345 | last post Mar 7 '06 by: sean345
While compiling my program I get the following g++ error: error: no matching function for call to `ErrorLog::file_error(std::string&, std::string&, const char)' note: candidates are: void ErrorLog::file_error(const std::string&, int, const std::string&) The error line is: log.file_error(filename, line, "variable is not assigned a value");
2
3,993
thread by: RadiationX | last post Mar 7 '06 by: Micah Cowan
How does this program work? // fig06_07.c -- COP2220 Example -- 040209 (sjd) // Student poll program #include <stdio.h> #include <stdlib.h> #define RESPONSE_SIZE 40 // number of survey responses
4
1,704
thread by: Xavier Décoret | last post Mar 7 '06 by: Victor Bazarov
I have just come across the following fact. Names defined in a template superclass of the current template must be qualified as being from the superclass. Alternatively, you can also qualify those names by preceding them with this->. An example might be clearer to read: template <typename T> struct Base {
2
2,723
thread by: manuthomas23 | last post Mar 7 '06 by: Fei Liu
Here is the code: #ifndef M3DCAMERA__H__ #define M3DCAMERA__H__ class M3DEngine; /** Micro3D Camera class. */
4
1,659
thread by: arcimboldo | last post Mar 7 '06 by: Fei Liu
Hello, I got a strange link problem; here are the simplest files showing the error: a.h:: #include <utility> class a{ public:
3
2,260
thread by: Steven T. Hatton | last post Mar 7 '06 by: Victor Bazarov
In this code, when will (should) Xfromer::release be called? struct C { C(const char* c) { f = Xformer::xform(c); } ~C() { Xformer::release(f); } const F* get() const { return f; } F* f; }; void fun(const char* c) { F* foo = C(c).get();
9
2,664
thread by: Bilgehan.Balban | last post Mar 7 '06 by: David Resnick
Hi, If I define an inline function in one .c file, and use it from another, after compiling and linking the two, it seems the function is not inlined but rather called as a regular function. I would expect to see it inlined during linkage of the two object files. Does inlining only occur if the inline function is defined within the same...
20
3,617
thread by: lovecreatesbeauty | last post Mar 7 '06 by: Keith Thompson
Hello experts, Is the following code snippet legal? If it is, how can exit() do the keyword return a favor and give a return value to the main function? Can a function call (or only this exit(n)) statement provide both function call and return features of the C programming language? /* headers omitted */ int main (void)
4
1,987
thread by: Andrew | last post Mar 7 '06 by: Victor Bazarov
Hello: Can someone please elaborate on why the member types 'value_type', 'reference', and 'const_reference' are all defined in a standard STL container. Why not just define 'value_type' and then use 'value_type&' and 'const value_type&'. Also, if we define these other types, why not define 'const_value_type', etc....
1
1,583
thread by: babu123 | last post Mar 7 '06 by: Phlip
HI Kindly send info on "data retrieving through ODBC in C++". Thanks Babu
3
1,551
thread by: Stainless | last post Mar 7 '06 by: Stainless
I want a class NPC which has a member variable wpn which is a pointer to a Weapon class. However the Weapon class has methods that require pointers to NPC classes. so obviously in Weapon.h I include NPC.h and in NPC.h I include Weapon.h both have proper #ifndef <blah> #define <blah> #endif structures
2
1,496
thread by: Unknownx4 | last post Mar 7 '06 by: red floyd
hey, i have a tool called undecor it generate .lib .h and a .def file. but the problem is the header file is coming out like this (example1.) but it needs to be like example2. it is for the game America's Army based on the unreal 2 engine.(undecor just uses dumpbin and undname) example1. public: __thiscall TArray<unsigned...
5
1,695
thread by: www.brook | last post Mar 7 '06 by: www.brook
I want to enfore the implementation of the operator overloading eg class Interface_ { public: virtual void operator = (const Interface &other)=0; virtual void operator +=(const Interface &other)=0; } class A:public Interface_ {
1
3,679
thread by: Richard Donovan | last post Mar 7 '06 by: Victor Bazarov
Hello! I'm a bit of a newcomer to the world of C++, but I was wondering...would it be possible to display cyrillic characters in a C++ console application? Thank you! Richard
1
312
thread by: Beih | last post Mar 7 '06 by: mlimber
Hey.. If you won't mind... I have this certain assignment in c++ programming where in we are asked to prepare a menu and everything that will be keyed in will be summed up. Thanks. :) Really in dire need of your help... :) If its okay, please email me atleats the algorithm for the said program... ü Graciŕs!
28
9,894
thread by: srikanth | last post Mar 7 '06 by: osmium
help me out with the subject
9
3,442
thread by: Greg Buchholz | last post Mar 7 '06 by: Bill Shortall
/* While writing a C++ version of the Mandelbrot benchmark over at the "The Great Computer Language Shootout"... http://shootout.alioth.debian.org/gp4/benchmark.php?test=mandelbrot&lang=all ....I've come across the issue that complex<double>'s seem quite slow unless compiled with -ffast-math. Of course doing that results in incorrect...
1
1,705
thread by: Daniel Llorens | last post Mar 7 '06 by: Dietmar Kuehl
Hi, I posted this to gcc-help@gcc.gnu.org but I didn't get any reply, so hopefully it can be seen as a generic C++ question too. I have this code which compiles cleanly under g++ 4.0.1. #include <cassert> struct A
10
1,889
thread by: Raj | last post Mar 7 '06 by: Fred Zwarts
Could anyone tell me how to display "Hello World" in C++ without writing anything inside main?i.e, main should not contain even a single statement (no object creation or no cout or anything)
3
1,994
thread by: leaf | last post Mar 7 '06 by: leaf
How do i 'cast' as a parameter a 'pointer to a member function' of the class to a function of a member class object of a class? Here's my example: //------------------------------------------------------------------------------------------------ class MyClass { public: void OnEvent( LPVOID lpParam ); void SetCallBack( void(__cdecl...
5
1,618
thread by: Anupam Kapoor | last post Mar 7 '06 by: CBFalconer
hi all, i have a fundamental question :o) ! c is said to emulate the von-neumann model of a computer. wherein we have a cpu connected to store via a pipe (i understand that this is a _very_ _very_ simplistic model of a machine). in von-neumann model, words flow between the store and the cpu (via the pipe). in this context, what i don't...
7
377
thread by: rpseguin | last post Mar 7 '06 by: CBFalconer
Ok. I've looked at expat, libxml, ... Too much baggage! I would like to find a small XML walker/"parser"/reader that simply gives me callbacks (C++ or C). No validation needed or wanted. I would prefer some open sourced, portable thing (Linux, OS/X, Windows, POSIX), with at most a couple of files and with no external dependencies. ...
0
1,635
thread by: globalfreecalling | last post Mar 7 '06 by: globalfreecalling
hi get link utilised this for limited time only http://www.globe7.com/downloadindex.php?refcode=N108G u will get 100 min free talk time
0
1,921
thread by: Siphiuel | last post Mar 7 '06 by: Siphiuel
Hi everyone. When using visitor pattern, we have a nasty dependence on the types of visitable objects that is coded way on top on the visitor hierarchy. i mean, like this: class AbstractVisitor { public: virtual void visit(Object_type_1 *); virtual void visit(Object_type_2 *)
0
301
thread by: globalfreecalling | last post Mar 7 '06 by: globalfreecalling
u will get advantage of this link http://www.globe7.com/downloadindex.php?refcode=N108G u will get 100 min free talk time

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.