49,757 Topics

Member Avatar for
Member Avatar for tfmontague

I have a class function - which I am trying to pass array values - however the function returns the values even when I don't use the reference &. WHY? COULD SOMEONE EXPLAIN THIS? [CODE] Block example; // create an instance of the class 'Block' int Array1[3] = {0,0,0}; // …

Member Avatar for alvinwong
0
84
Member Avatar for creative_m

how to write a c++ code to solve this problemes 1- make program using recourison to make a tringle (the first line has one star the second has 3 stars and the line number n has (2n-1)stars

Member Avatar for alvinwong
0
86
Member Avatar for tinkeydo

The first part inside the "If" statement works perfectly. The only part I am having trouble with is the "else" statement. I was trying to get it to generate an "x" amount of passwords and get those passwords to be at a length defined by the user. The problem is …

Member Avatar for alvinwong
0
90
Member Avatar for bijayswain

I want to put this code into separate window so that the results are displayed in a custom window not in a command prompt [CODE]#include <iostream> #include <string> using namespace std; void main() { system("title Find Mac From IP"); system("cls && Color DF"); cout<<"--------------------------------------------------------------------------------\n"; cout<<" This Utility is designed to …

Member Avatar for alvinwong
0
107
Member Avatar for mindfreaks2000

HEY.Guyz If u r programming in visual studio c++ .PLz SHARE UR SOURCE CODE HERE.I WILL ALSO SHARE MINE.THANKXX;)

Member Avatar for cwarn23
-7
168
Member Avatar for Instinctlol

Can anyone tell me why it loops my menu() twice after i enter the numbers from Add(). I know it has to do something with cin.ignore() but I don't know where to place it so it doesn't loop my Menu() after. [CODE]#include <iostream> #include <string> #include <fstream> using namespace std; …

Member Avatar for farooq007
0
115
Member Avatar for cwarn23

I have been searching on the web but can't find an answer to this question. How do I make a simple script that will read the functions in a php.net dll file where it can be used in c++. The main reason why I am trying to do this is …

Member Avatar for cwarn23
0
154
Member Avatar for marirs07

HI,can anyone help me by telling how to copy a file from one drive to other say C to D.Thanks in advance.............

Member Avatar for sfuo
0
65
Member Avatar for laelzio.mosca

Please help! [CODE]// Laelzio Mosca // 12/09/09 // Tic Tac Toe game #include <iostream> using std::cout; using std::cin; using std::endl; #include <iomanip> using std::setw; #include <string> using std::string; #include <cstdlib> using std::rand; using std::srand; #include <ctime> using std::time; //global variables const int row = 3; //size of array const int …

0
70
Member Avatar for Thumb2

[code=C++] #include <fstream> using namespace std; void a(ifstream b){} void main() { ifstream b("c.txt"); a(b); // error caused when function a() is used } [/code] Why is this producing an error? Thank you, Thumb2

Member Avatar for jonsca
0
143
Member Avatar for gretty

Hello I have a static window control & I want to make the text inside that static window centre aligned. [B]Is is possible to do that with a static window?[/B] Or should I use another function? static window: [CODE] stBox = CreateWindowEx( 0, "Static", s.c_str(), WS_BORDER | WS_CHILD | WS_VISIBLE, …

Member Avatar for William Hemsworth
1
226
Member Avatar for restrictment

Is this even possible? Or do I have to make the user download the program before they can use it.

Member Avatar for jonsca
0
120
Member Avatar for evilsweeps

Hi, this is my first post on here so forgive me if my question or code is unclear. I'm coding a binary search tree and I'm stuck on the overloaded ==operator. [CODE] //BSTCLASS.CPP template <class ItemType> void BstClass<ItemType>::rFindNode(node<ItemType>* trav,ItemType& item,node<ItemType>* rtTrav, ItemType& rtItem, bool& equal)const { rFindNode(trav->left, trav->left->data, rtTrav->left, rtTrav->left->data, …

Member Avatar for evilsweeps
0
265
Member Avatar for Hathake

Hi there everyone! I am doing calculator that analysses a math term in a postfix notation. My code seems nice, but I suspect it doesnt calculate at all ! It only writes back imput .. Maybe theres error in string/char conversion for all that I know. But please have a …

Member Avatar for Lerner
0
79
Member Avatar for qwertymk

I know I'm supposed to use new and delete, but I really need to use realloc, and I'm curious to how it can be done. [code] myclass { ... public: myclass() { cout << "Hi, I'm the constuctor" << endl; }; int main() { myclass *m; m = (myclass*) malloc …

Member Avatar for Narue
0
143
Member Avatar for laNeek

Greetings! I've been messing around with a bit of code for a while now and I've got it compiling etc etc. The only problem is with perfecting the quicksort function (probably trivial, but then I'm not very skilled). From the output file, it seems to 'sort of' sort the string …

Member Avatar for laNeek
0
101
Member Avatar for HITMANOF44th

hello out there i have a program i made to scan barcodes and reformat the data it gets from com2 now when the thing scanns theres a function called to a class but if there is no new data present it just sit's there waiting for new data ? and …

Member Avatar for HITMANOF44th
0
100
Member Avatar for bijayswain

How to use reg add function in c or c++ program I am using system("reg add .........."); but this gives me a error " program too big to fit in memory" what could be the problem. please suggest

Member Avatar for Ancient Dragon
0
1K
Member Avatar for Agni

[code=c++] class A: public B { C* p1; C* p2; } [/code] What would be a correct assignment operator for class A? We have to ensure that we do not leave any object in an inconsistent state due to any exceptions or create any dangling references or memory leaks.

Member Avatar for Dave Sinkula
0
151
Member Avatar for new programer

hello all I needed to cut a string at a certain point and swap the position of the pieces so I did the following functions [it does not work well] : [CODE]void findcutswitch(string unlock_w, char ring[][26]) { for(int i=0; i<3; i++) { for(int j=0; j<26; j++) { if(ring[i][j]==unlock_w[i]) { int …

Member Avatar for Excizted
0
138
Member Avatar for Instinctlol

can anyone explain to me what return does? I know that return(0) stops the program at any given point, but what does returning others do?

Member Avatar for Narue
0
112
Member Avatar for nschessnerd

Hey, I use openfiledialog to load a file as so: [code=cplusplus] OpenFileDialog^ ofd=gcnew OpenFileDialog; ofd->Filter="Monitor files (*.hmc)|*.hmc"; ofd->FileName="";if(ofd->ShowDialog()==System::Windows::Forms::DialogResult::OK){ loadFile(ofd->FileName); } [/code] when i initially run the program memory in task manager is about 10,000K. when this code runs it jumps to 17,000K and doesnt go back down. I tried using …

Member Avatar for Narue
0
134
Member Avatar for fadia

Question1: Modify your assignment-3, add separator mutator for each field and validate its value in mutators. The setTime validates time by using individual mutators of fields. Add no-argument constructor and three argument constructor. There argument constructor validates fields by using individual mutator of each field. Write new application to use …

Member Avatar for fadia
0
93
Member Avatar for ankiwalia

i have to generate filenames text file names as c:\\blabla.. saved(counter).txt the counter is an integer value i cant do it i cant generate filename like dat i declared a string c:\\blabla second counter third .txt now i have to concatenate all three in a string variable and this has …

Member Avatar for mrnutty
0
88
Member Avatar for jerry_08

guyz i need help.im begner in c++.then problem gave my prof 2me is.GET THE LCD(less common denomnator) input by the user.then i sucesfly made it.she gave us another prob again.REDUCE THE LCD U GOT..and i dont know what is the statemnt i will input.WAITING FOR REPLY THANKS.. need help...i don't …

Member Avatar for zortec
-3
88
Member Avatar for saintrenz

I need Help! Consider this following modified version of the binary search algorithm. (Modifications are indicated by a comment highlighted asterisks.) With this new version of the binary search algorithmn work correctly for all data? If not, specify a situiation in which this version will fail. [code]template<class element, class Keytype> …

Member Avatar for saintrenz
0
101
Member Avatar for s8498

Hey everyone, I'm new to posting in these forums so sorry if I didn't post my code correctly? I think i did it...hopefully. Anyways, I've been working on this all day but I can't figure it out. (i think i will be having problems with the rest of my assignments …

Member Avatar for UberJoker
0
2K
Member Avatar for nedsnurb

hi, the following program has got to take a user inputted string and allows the user to see the postion of each character in the array i.e. T H I S I S A T E S T 0 1 2 3 4 5 6 7 8 9 10 11 …

Member Avatar for UberJoker
0
107
Member Avatar for EngneerNitemare

Hey all, I am having a little bit of trouble wrapping this segment up. I need a for loop that will wrap a 3 digit number (i.e. 320) vertically so that it displays like below. 3 2 0 instead of... 320 Here is the code I have already: [CODE]#include<iostream> #include<fstream> …

Member Avatar for EngneerNitemare
0
2K
Member Avatar for NicAx64

hi all, I get a compile time error when I tried to assign A* to A[]. I get the error in DEV C++ , mingw ,error "incompatible type assignment" should I have to use dirty pointers for this ? [code=cplusplus] #include <iostream> class A { public: int a ; int …

Member Avatar for NicAx64
0
150

The End.