General C++ Programming - August 2010 (Page 16)

Handling log10:SING error
 
I'm the beginner in c and c++ programming.when i want to calculate log10(0.0) then the program's output shows log10:SING error. i want to handle this error myse...
[1 reply] : Try this float l = log10(.0); if(errno == 0) std::cout << l; els... (by hamsterman)
A new C++ Application Framework - FFEAD
 
Hi All, I have developed a new Application framework for C++ ( Framework For Enterprise Application Development )which provides, features like, Business Dr...
[no replies]
by Tiigon
A problem with vectors
 
I'm trying to create a small "roguelike" game with C++. I'm using a vector to store all objects so they are easier to draw. However I have a little problem. Thi...
[2 replies] Last: Thanks, I put it inside a function and it works now :) (by Tiigon)
Dynamic Array of Linked List question
 
I am using a dynamic array of linked lists as a data structure to help avoid collisions in a hash table. I want to dynamically allocate the size of the array of...
[1 reply] : I think you need to breakdown your types further. Your hash table s... (by kbw)
by vkaul1
problem in copying contents from one map to another map
 
After using the same map key value pair, I wanted to clear the existing contents of sourcePoints and transfer all contents from halflambdaResolution into s...
[3 replies] Last: Are you absolutely sure one of those lines is the one causing the erro... (by helios)
strange memory leak (1,2)
 
Hi all, I've written some code that is exhibiting some very strange behavior. It is basically an implementation of Prim's algorithm on a matrix of nodes to p...
[23 replies] Last: @tition: Yeah, I did indeed try that. It never changes. (by midnightcarousel)
Windows Application Tutorial
 
I was wondering if anyone knew a good tutorial on making applications with windows(as in the actual window the application runs in) Thanks In Advance
[1 reply] : http://www.functionx.com/win32/index.htm http://zetcode.com/tutorials... (by blackcoder41)
Bubble Sorting Difficulties
 
Hello all, I tried posting this on the beginners forum but wasn't having a ton of luck with it so maybe this forum will work better. I have the code mostly ...
[2 replies] Last: Awesome-- thanks so much for your help with this! (by slg5094)
by water
reading files line by line
 
Hey all, i want to make a script that doesn't only open a file and write the content, but that can also write specific lines to variables hello this is...
[3 replies] Last: I will usually just load the file into a deque <string> , and then me... (by Duthomhas)
by memecs
Exception-safe code.
 
Hello, I am reading Exceptional C++ and, in item 8, I found this: Stack::Stack(): v_(0), vsize_(10) { v_ = new T ; } The book says that the abov...
[2 replies] Last: yeah, I think the implementation of new operator is something like: ... (by memecs)
Errors when creating files.
 
I've been trying to have my program take the text entered by the user, save it as a variable, then create a file with the variable as the name of the file. I wa...
[8 replies] Last: Thanks!!! (by D Technodude)
Efficient way to solve this problem
 
I have a problem in which we are given 2 sets A and B and we have to find set C which contains elements common to A and B.The set A and B can contain duplicat...
[3 replies] Last: Oh, right. http://www.cplusplus.com/reference/algorithm/set_intersect... (by helios)
Why my program that uses increment operators doesn't work?
 
My goal is to create two objects, use the default constructor on one and instantiate the other with 8. Call the increment operator on each and print their valu...
[2 replies] Last: Great, that worked. Thanks a lot! You the man :) (by CaptainBlood)
Multiple Redefinitions?
 
[quote=DialogSpec_H] #pragma once #ifndef __INC__DIALOGSPEC #define __INC__DIALOGSPEC #include <string> #include <sstream> //////////////////////////////...
[1 reply] : By having the function body in the header, you're redefining the funct... (by Disch)
Why don't set every header file as precompiled ?
 
Hi there! I've a quick question about precompiled headers. Why don't set every header file as precompiled in order to reduce compilation time ? Has a pre...
[9 replies] Last: Can somebody comment my previous post ? This wxDevC++'s behaviour k... (by Quentin)
by balki
vector doesnt obey constructor of classess?
 
When I use vectors to create multiple objects of a class, why doesn't it update a static counter of the class which I do in the constructor? But When i empty th...
[2 replies] Last: Thanks. got it :) (by balki)
by piotr5
what does c++-standard say on class-coversion operator?
 
what I have in ms visual c++ is template<T,Parent> class A { _STATIC_ASSERT(::Loki::SuperSubclass<Parent,T>::value); ... T data }; template<class T...
[3 replies] Last: Well, the typecast does not cast anything here but is giving a pe... (by EverBeginner)
Why do i get invalid use of non-static member function error?
 
I'm doing the exercised from the book Teach Yourself C++ in 21 Days and in one of the exercises I get error: invalid use of non-static memb...
[2 replies] Last: Thanks, that worked perfectly! :) (by CaptainBlood)
Permutation with sets of elements
 
I want to write a code to find the permutation of these sets: A {A1, A2} B {B1, B2} C {C1, C2} I want to keep the order of A, B, C, but want to get the pe...
[1 reply] : High! I would begin with this order : A1,... (by EverBeginner)
can not create a function pointer of class (1,2,3)
 
I have one templated class in one test1.h file. template<Data_T> class test { ..... ..... } In another header file test2.h i am creating a structure li...
[48 replies] Last: If the functions need to access the member variables then there is no ... (by Galik)
August 2010 Pages: 1... 1415161718... 20
  Archived months: [jul2010] [sep2010]

This is an archived page. To post a new message, go to the current page.