General C++ Programming - June 2009 (Page 3)

find seed for modified rand()
 
As you know,sourcode of rand() of c++ use three parameters, one is seed, one is a and other is c. a and c parameters have some defined integer value by c++. I h...
[8 replies] Last: Damn. What a waste of time. I just figured out the values for a and b... (by helios)
by erez26
heap corruption detected
 
hi everyone i wrote a simple code but somehow it doesn't work. can anyone please help me and tell me why does the content of the objects erase when it get t...
[2 replies] Last: when I tried compiling your code I got warnings that in the operator-,... (by smilodon)
Looking for database library using ODBC, possibly SOCI
 
I'm very interested in finding a C++ database library that will allow me to query various database types. I ran across a forum circa 2006 discussing SOCI and...
[no replies]
by superQ
Speak your completely subjective opinions
 
So I'm curious as to what people think. I'll say now please don't argue and flame each other, but I'd probably have my hopes too high to assume it won't happen ...
[12 replies] Last: If you are on a distro like Ubuntu you should install the package cod... (by Bazzy)
by erez26
heap corruption detected
 
can someone please tell me what's wrong with this code... i don't understand why the objects's content erased before it gets to main. thanks #include <io...
[1 reply] : g++ f.cpp f.cpp: In member function `String& String::operator+(const ... (by jsmith)
Rational numbers
 
Can someone please help!! I have two errors and one warning (listed below)and I am having a hard time correcting them. Any advice will be appreciated!! #in...
[3 replies] Last: Unfortunately not every programmer knows one can format forum (esp. C+... (by wmheric)
weird pointer problem
 
Hi, Here's my code: #include <iostream> struct BASE{ int a; }; struct PARENT:public BASE{ virtual void Func()=0; }; struct CHILD:public ...
[6 replies] Last: When a class/struct contains at least one virtual function or a virtua... (by jsmith)
Inquires
 
I don not know anything about this language, but I will like to be a guru in this particular aspect, because I want to become a Financial analyst. How best can ...
[1 reply] : If you want to get started learning, try the tutorials on this site: ... (by firedraco)
fopen
 
I am having a hard time finding the information I need on fopen and the C style input/output to a file. I am creating a database for product information and ...
[13 replies] Last: Yea, it's a bit overkill, but what's wrong with going over the top if ... (by dmoore210)
Trouble with memcopy
 
Hey guys, I'm having trouble understanding this... char* buffer = "My name is steve."; char* name = new char ; memcpy(name, &buffer , 5); cout << name;...
[2 replies] Last: Ahhhh! Now i follow, thanks so much! (by enigmatix)
by rj84
need to finish "TT class"
 
code should display 90 and 225... I am having too many parameters error #include <iostream> using namespace std; class TT { protected: int value1;...
[4 replies] Last: It probably should be declared as a friend function, and the "other" p... (by jsmith)
Qt or not at work
 
Can I use the LGPL version of the Qt library at work? I work for a private manufacturing firm and I would like to utilize Qt's library for inhouse GUI and data...
[3 replies] Last: The way I understand the GPL, you can use GPL'd software internally (i... (by helios)
'expected constructor, desctructor or type convertor' error
 
hey guys, so i am making a c++ program using the sdl library in ubuntu. theres this one structure called SDL_Rect, and i tried to make an instance of it, like s...
[8 replies] Last: You aren't linking against the SDL libraries. That's all the undefine... (by jsmith)
C++ with Web Page Coding
 
Hello I am learnig C++. I am curious about C++ with Web Page Coding. Can you give me example code, documantation?
[no replies]
Segfault when calling function
 
I receive the following error when calling the principal function in my program: Program received signal SIGSEGV, Segmentation fault. 0x0000000000402ba8 in...
[13 replies] Last: Both work. The former is most in the spirit of how people think about... (by jsmith)
by Disch
Is mutex generation expensive?
 
This project I'm working on potentially has a lot of objects in a multithreading environment. These objects are reading from a handful of resources. For examp...
[3 replies] Last: Allocation time is insignificant, as well. The only problem with mute... (by helios)
Process Date - Genealogy Like
 
I want to include Date processing in an application I am developing; but allow inaccurate dates to be entered and maintained. Sound strange? If you have ever...
[2 replies] Last: Due to no response indicationg someone has done this before - I guess ... (by wagb278)
A strange link error
 
I defined a template class FieldSet and a struct TableNode. Then I tried to claim "FieldSet<TableNode> fieldSet " in another class called DBOperations. And th...
[5 replies] Last: Thank you, everyone! I've fixed it with your help! (by deleting Fiel... (by calmire)
by rilpo
pointer_unary_function and class member functions
 
Hello to everybody, I have a compile problem that relates to the use of std::pointer_unary_function with a class member function. There is a simple example : ...
[5 replies] Last: Excellent! If you are familiar with/have used <functional>, then yo... (by jsmith)
by mdka
max flow min cost c++ algorithm
 
Hello folks,nice to meet you!Can somebody suggest an algorithm for finding the max flow and the min cost between a source and a consumer in an acyclic graph wit...
[2 replies] Last: Just a starter on how to convert the flow restrictions to a simplex pr... (by tition)
June 2009 Pages: 12345... 13
  Archived months: [may2009] [jul2009]

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