General C++ Programming - March 2009 (Page 14)

by queen
C++ assignment
 
Help with C++ assignment... Okay, so I am not expecting a whole source code (although I'd like that) but I know no one would just plainly give it out so what...
[1 reply] : You should make a function that given some parameters of you and of th... (by Bazzy)
sequential search issue
 
Hi guys, I'm working on this class file program that asks a user to create an array, fill/append it with integers, and then find the input using a findElement f...
[no replies]
to take array elements from function
 
I need some help to take array values from function: using namespace std; int i; double translational_velocity(double x ,double y , int ...
[1 reply] : Array's are constant pointers. That means that you can pass an array t... (by Scipio)
by zak79
Exclude STL from debug
 
Hi, How to exclude STL from debug? Thanks, zak
[no replies]
how to sort the array bu heapsort
 
lady and genlement! please help me to solve the small problems: how to sort the the array by heap sort with the strucktrue: that be sorted in the array jus...
[2 replies] Last: Google is bad...don't use it translate please... (by firedraco)
Getting Error when passing by reference
 
I'm trying to pass in vector<LeafNode*> LeafNodeList; by reference into a class like this: TreeFromListConstruction tree(&LeafNodeList); why can't I do it...
[2 replies] Last: Thank you! (by translore)
by Hazer
Password program
 
#include <iostream> #include <conio.h> using namespace std; int main(){ int i=0; char password =""; string str="secret"; char ch; while(1){ ch=get...
[6 replies] Last: Also, if the password is stored as plaintext in memory, someone could ... (by firedraco)
template link error
 
Hi, I have a problem linking to my template operator functions. They are declared and defined in the header so I don't actually know why the compiler can't ...
[2 replies] Last: oops sorry template<_DataType> was a typo. your fix solved my probl... (by gluballs)
by chni
[SOLVED] Overload operator<< : no match for ‘operator<<’
 
Hello, I am trying to overload the << operator in order to write a "Printer" class like the class of std::cout. header file: class Printer { public: ...
[4 replies] Last: @Disch, helios: Thank you very much for your help. I did not think of ... (by chni)
Detect memory leak of a running process
 
Please let me know, how to detect if the application has memory leak in linux platform. Which command/tool and what counters to track, to confidently say that t...
[1 reply] : The easiest way is using a system monitor and see how much memory the ... (by helios)
Using std::string with exceptions disabled
 
I'm developing in an environment that is very constrained on memory and thus C++ exception handling has been turned off. Does this mean I cannot use std::strin...
[6 replies] Last: I guess I will have to give it a whirl. I'm developing on an ARM 9 en... (by Mortvola)
Should delete be done after failed new?
 
data_ = new(nothrow) string( data ); if ( !data_ ) goto error; Should I add "delete data_;" or it would end even worse? (Thanks for replies, some of...
[1 reply] : The normal way to assign memory to a pointer (using nothrow): int ... (by Scipio)
by jer17
Palindrome problem
 
hey guys can someone help me in my project: i can only use array no other than.. just iostream lib. the problem is arranging the parenthesis. a open p...
[1 reply] : My suggestion: 1.) Copy the string 2.) replace each occurence of ("n... (by onur)
by muster
id for a hashtable
 
hey all. I'm going to add an object to a hash table in c++ but i prefer for this object to have an automated id, so i did this in the constructor of the class:i...
[5 replies] Last: This is a classic "hashclash" problem. Hash tables make inserting/retr... (by n4nature)
by Whando
Wavelet Source Code
 
Hi, I was wondering if anyone knew of some C source code for 1D wavelets that I can use to process a stream of data? (the data at the moment is floats howeve...
[no replies]
by Whando
Text File Into Arrays
 
Hi guys, I am a beginner at this an was wondering if you could help. I have a text file which I can display in two columns as below, for example: 2.333,3433....
[3 replies] Last: Thanks that is great! (by Whando)
Pointers and Vectors
 
I have a vector: vector<Turret> turrets; and I have filled it with Turret objects. I have a pointer vector<Turret>::pointer ptr = &turrets ; I know that...
[2 replies] Last: You probably want to brush up on iterators. See http://www.cplusplus.... (by kbw)
Drawing a line between 2 points in a console
 
Looking at a function helios remade here ( http://www.cplusplus.com/forum/beginner/8702/ ) I quickly threw this together and was wondering if it's possible in a...
[1 reply] : Just got it working by using this: int Sign(double x) { if (x... (by Mythios)
Incrementing a char variable
 
According to ASCII, the value of B is the value of A plus one. So, it is right to use the code c++; to increment a character value. E.g.,if c=A and c++....
[2 replies] Last: You can simply test it ;-). #include<iostream> char a = 'A' ; ... (by onur)
changing negative fraction to positive in c++
 
Hi I am having a little difficulty in knowing how to change a fraction into positive if it is currently negative. Does anyone know how to achieve this in c++...
[5 replies] Last: num=1; denom=-1; int sign = num * denom < 0 ? -1 : 1 ; //sign=-1... (by helios)
March 2009 Pages: 1... 1213141516... 21
  Archived months: [feb2009] [apr2009]

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