General C++ Programming - July 2010 (Page 18)

linker error for friend function
 
Hi , I have a class CPlant .. this is the header function Plant.h class CPlant { public: int i; public: CPlant(void); CPlant(int ii); ~CPlan...
[10 replies] Last: Thanks you filipe ... it worked ...thanks all of you gurus .. (by bluecoder)
C++ - Single Linked List - Ideas
 
I want to write a method to remove consecutive items with duplicate data values from a singly linked list. The method should return the number of items removed....
[3 replies] Last: you can use STL instead of structure that will be faster What makes... (by jmc)
coding practices
 
How would you rank the following coding practices in order of most important to achieve in writing a c++(or any other) method(1 being most important)? 1.)Min...
[13 replies] Last: The bottom line is that every programmer should strive to write the si... (by jsmith)
Maths C++ project
 
For school I need do a project about maths and I thought I could use my C++ coding to help but I really have no idea what project I could do. I can do anything ...
[6 replies] Last: build the expression into a binary tree that maintained the correct o... (by helios)
Output File Size Issue (Solved!)
 
Hello everyone, I am writing a .dll for a separate project and have run into a problem regarding the file size of the dll. Here's my code: #include <fs...
[2 replies] Last: Thanks a lot for the quick reply! I switched to the C file functions a... (by Tylerzz)
more ifstream questions, vector allocation & getline()
 
I have a text file that reads: vector<Event_Information_Structure> Event_Data {["struct", "information", "here"]["and", "some", "more"]["and a lot", "more ab...
[2 replies] Last: Is this vector going to be used as an event queue? If so, you should u... (by helios)
Defining C functions in .cpp file
 
Hello Experts, My requirement is to call a 'C' function from a .cpp file and I want to define that function in the same .cpp file. To achieve this: ...
[2 replies] Last: The function should be declared within an extern "C" block in the head... (by jsmith)
can't write operator<< for std::pair?
 
Take a look at this code. I have seen some threads on this on other forums and the answer seems to be that you have to put the operator<< inside of namespace s...
[3 replies] Last: The first link you gave mentioned Koenig lookup, aka ADL, so I researc... (by jsmith)
by jhapk
Turn warning off
 
Hi, I am working on a group code and looks like someone has changed something in the makefile and so every time I compile the code I get this warning message...
[2 replies] Last: +1 jsmith If someone turned the warning on it may be because they d... (by Galik)
How can I alter how a user-defined type/enum is displayed? (facet/locale?)
 
Hi folks For a given user-defined type or enum: eg: enum blah { FOO, BAR }; How can I alter how the operator<< displays my blah enum? (i...
[10 replies] Last: I think you are confusing the interface to a stream with its implement... (by Duthomhas)
Question about cout
 
hi all, Now my target is to convert 1000 to $1,000 ie, a number to currency format. Yes, its possible to put in a logic that converts it into a string ...
[11 replies] Last: The money_put <> facets are designed for this... Unfortunately they r... (by Duthomhas)
atof()
 
What can I do, if I want to convert "0.0" to number and at the same time, check if the function succeeds? char* str = "abc"; if(!atof(str)) ... if fail, do...
[3 replies] Last: Here is a way: #include <sstream> // ... stuff const char... (by Galik)
Bit-Shifting trouble
 
Greetings, I'm at a loss here. I was wondering if anyone knows why gcc gives me these warnings. KmerGenome.cpp:199: warning: statement has no effect KmerGe...
[2 replies] Last: oh wow. Thank you so much for the quick response. That totally solved ... (by BioCrunch3110)
making tic-tac-toe
 
plz help
[2 replies] Last: He doesnt know how to do tic tac toe ofcourse, First of all sir, yo... (by Skillless)
by arren
Strange problem with overloading operators
 
Good time of day! I have a problem, please, help me to solve it. Here is code: types.h: typedef std::map <uint, std::string> ClusterListMapping; Clu...
[8 replies] Last: I agree, memory leak should be, this is because I decide do not overlo... (by arren)
number convert to numerals
 
elow,everyone. pls....help me to creat a program that will read any integer number from 1 to 1500 and convert the number to numerals.... that the proga...
[1 reply] : Why don't you give it your best shot, post the code here? Then we'll d... (by Galik)
Composition with pointers
 
I created a class that has as members two pointers to other classes I created. I am having problems with the destructor of this class. Because the members are p...
[6 replies] Last: As a general rule, if you have to free memory in your destructor eithe... (by jsmith)
Eclipse SDK
 
This might be a little off-topic and noobish, but is there a way to automate Eclipse CDT more? Like make it compile resource files and embbed them on itself. Or...
[3 replies] Last: TO undesratnd...i used the pre-build feature with this command: wind... (by LoLFactor)
Threading with Serial Port read
 
Hi, I am new to this forum. I am using UBUNTU linux 9.10 where i am connecting two devices simultaneously through serial ports. Ser1: ttys0: Dev1 Ser2: tt...
[5 replies] Last: Thanks RedX. I will try your suggestions and soon get back to you here... (by abhimohpra)
CHAR POINTER
 
Hi Guys I have a small doubt on the char pointers. I have a case where the char pointer points to the start of a memory address int* ptr--> -------...
[3 replies] Last: If this pointer was dynamically allocated, you may already have its si... (by closed account N85iE3v7)
July 2010 Pages: 1... 1617181920
  Archived months: [jun2010] [aug2010]

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