General C++ Programming - November 2010 (Page 3)

Friend Class(question)
 
i want to use friend class but when i try i take these errors pls help me:S i am sure i am not using frien function correctly but didnt solved:( Error 1 err...
[2 replies] Last: thanks it works ;) (by tunayan)
by pkjm17
Queue Simulation
 
My problem is I can't get it to output if another person enters the queue at a minute which the person before them is still being served. I think I need to put ...
[no replies]
ActiveX DLL
 
Hi guys, I have a DLL which is an ActiveX control to a CRS F3 Robot, I want to load it properly to use the methods in it and retrieve info from the robot. Probl...
[no replies]
Bubble sort
 
Hi! Can anyone help me please! I have to write an C++ programm that sort number like: last goes first, second last goes last, etc. Can anyone please write an f...
[1 reply] : no. do your homework yourself. there is some pseudocode in wikipedia ... (by hamsterman)
by madsky
create a thread and save output in file
 
hello all i need a program to create a thread and get one number,then in that thread find all prime number that is smaller than input number,and print them a...
[7 replies] Last: are you crazy? (by madsky)
by indr
classes c++
 
this is my header file.. sorted_list.h class sorted_list { private: class list_link { private: int key; // identifies the data double value; // ...
[3 replies] Last: Just make the variable public (the class is private so you can't acces... (by ne555)
by heinzi
Overloading a virtual function doesn't work
 
#include <iostream> class Parent { public: void func1() {std::cout << "Parent::func1()"<<std::endl;} virtual v...
[7 replies] Last: am I the only one that noticed that his function signature was voi... (by rstiltskin)
by indr
classes c++
 
this is my header file.. sorted_list.h class sorted_list { private: class list_link { private: int key; // identifies the data double value; // ...
[no replies]
by fukki
Pointer *a=b or a*=b* ?
 
Hello, i study about stacks, and i want to know if Node *old top = top node; is the same as Node *old top = *top node; if not whats the difference. My c...
[2 replies] Last: That was very helpfull hamsterman , thanks! (by fukki)
getline
 
ok here is my issue (I'm sure it's something simple) this is a snipet of my code from main that calls the menu function that displays a menu of options. When I ...
[2 replies] Last: Thank you very much. That got me over a hurdle now I am on to the nex... (by JohnB1975)
by SoD
allocating memory on memory already in use
 
I have a problem with a program I am writing in c++. At a certain part of a program, when I use new to allocate memory to a pointer TreeNode<T>* node; ...
[2 replies] Last: I have in my project 2 binary trees. At a certain point, when the prog... (by SoD)
(memory leak?) Using new/delete with vectors in a destructor.
 
Hello, I'm worried this code may cause a memory leak, its fairly straightforward otherwise. I wanted some feedback on how it would be best to delete the poi...
[5 replies] Last: 1)Copy constructor object (const object &) { //copy logic here... (by Silvermaul)
What's wrong with the goto statement? (1,2)
 
I've heard people say that the goto statement isn't the way to go but why? If it isn't what is a good alternative? Please don't mind me being a noob and asking ...
[28 replies] Last: If you use a C string, C structure, or array it will be optimizable, b... (by rocketboy9000)
LongInt class
 
Folks, i have been working on a LongInt class for the past two weeks almost. For those of you who may not understand what I'm referring to, this class replaces ...
[16 replies] Last: It does help. Thank you guys. I decided to return to the drawing board... (by afdave14)
by eohama
Expected Primary Expression Before Token (1,2)
 
The following code won't compile, I keep getting Expected primary-expression before ‘[’ token . Removing the asterisk changes the error to Invalid conve...
[34 replies] Last: You can in gnu c: int *sort_ints(int * x, int n){ int intcmp(int... (by rocketboy9000)
VectorDouble copy and operator problem
 
public: friend bool &operator == (const VectorDouble &v4,VectorDouble &v3 ); VectorDouble(); VectorDouble(int numOfElements); VectorDouble(const...
[1 reply] : Your return and argument types are incorrect. I would suggest taking ... (by jimc)
different options
 
I wrote a program to do different calculations.I wrote it so that everytime a user enters a choice,it does a different calculation.After the user finishes its s...
[1 reply] : hi, To make your code repeat you would need something like this ... (by shredded)
strtok file problem
 
#include <iostream> int main () { FILE* fp; FILE* fo; char* filename = "words.txt"; char* fileo = "output.txt"; char* pch; ...
[6 replies] Last: You should call fopen once for each file. You're calling it multiple ... (by kbw)
matching words between files
 
I'm trying to write a program that reads text from one file and determines which words from that file were found and how many times they were found in another ...
[2 replies] Last: I've been working on a similar project , and ive used this code actual... (by snake)
by Shapor
Error using signal.h
 
Hi, everybody! I have the problem when I compile my program and I really don't know what to do. First of all, I want to say that before writing here I was se...
[1 reply] : The problem is that your signal handling function doesn't have the sam... (by kooth)
November 2010 Pages: 12345... 21
  Archived months: [oct2010] [dec2010]

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