51,593 Topics

Member Avatar for
Member Avatar for AutoC

hi, I've completed huffman coding..but there is one small issue...in my decoded file the character "ΓΏ" keeps appearing at random places...I checked the problem and a second parse of the input file gives some characters that are not in my tree which ends up adding a code 0 of length …

Member Avatar for AutoC
0
103
Member Avatar for Kidd87

When I excute my program and open up the text file, it only reads me the 1234 then junk below it. I have no clue what do. Anything is welcome. Below is my .cpp file my text file looks something like this 1234 jack hammer 75.00 .45 10 5678 Daffy …

Member Avatar for Ancient Dragon
0
96
Member Avatar for jthechemist

Hey all. I've made stacks aplenty in Java before; my C++ is a bit rusty though, so I thought this would be a good project for me. Turns out I was rustier than I thought! So here's the situation: I've made classes LinkedNode, jStack, and Test. Test simply holds an …

Member Avatar for ArkM
0
115
Member Avatar for mugun

Hello everyone...i need help with text file in c++,i know that we can append like ios::app and into a text file.....i need help in inserting a particular string to a particular line in a text file.....is that possible....So far i only knw tht it will append at the bottom of …

Member Avatar for mugun
0
180
Member Avatar for DemonGal711

I'm trying to read a line from a text document so I can move it into an array. So I've tried to get this to work out and it stops when it sees the "while" line. [CODE]void input (ifstream& file, int& end, string word[]) { int x = 0; string …

Member Avatar for DemonGal711
0
105
Member Avatar for DemonGal711

Okay, I have this program I have to write. I think I get the basis of the idea, but I'm a little confused about parts of the instructions. Here's the instructions. [B]Write a C++ program that uses bit strings to represent sets, and finds A^B, AUB, A-B, where A and …

Member Avatar for DemonGal711
0
119
Member Avatar for acoxia

Hello i have a quick question working on a hangman project and have most of it done but i was wondering how to count how many letters a word has in order to have the right amount of spaces wondering if a function or something exists or a link to …

Member Avatar for acoxia
0
115
Member Avatar for c++ prog

hi, im creating a simple game here...its a shooting game...so how can I make my program read the keyboard to control the player's movement around?tnx in advance

Member Avatar for Duoas
0
265
Member Avatar for aloplop

Hi folks, my problem is that I want to send to a Webcam connected in the port 80 of a remote machine an order to move itself from my application developed in C++. The company has sent to me this code: POST /pantiltcontrol.cgi HTTP/1.0(0D0A) User-Agent: agent_name(0D0A) Content-length: length(0D0A) Authorization: Basic …

0
52
Member Avatar for marivic
Member Avatar for chern4ever

i want to input 2 data into an array, then compare it. however, do user input the data will be minutes and seconds example : 5 minutes 30.4 seconds and 6 minutes 40.5 seconds cin >> minutes, second can i compare these two data without adding the minutes and seconds …

Member Avatar for ArkM
0
78
Member Avatar for asifjavaid

hi guys, i have declared a char pointer. i am using this in itoa() function to convert integer data into hex data e.g [code] char * hexData= NULL; itoa(1484820,hexData,16);[/code] this results in equalent of 1484820 in hex decimal and store it in hexData. now when I want to some process …

Member Avatar for ArkM
0
173
Member Avatar for asifjavaid

hi guys, I want to call win32 dll in C#. It has parameters encode(char *argv[]). what i have to write in in C# in the placa of char *argv[]. I have make my efforts see my code below but vain. [code] // in C++ int ConvertBinToAmt(char JFIF_NTSC_XML_File1[],char JFIF_NTSC_XML_File2[], char DestinationFolderName[],char …

Member Avatar for LizR
0
205
Member Avatar for abcd_nima

Is it possible for a function to return a string,an array of characters to the calling function? i mean something like char f1() { char www="nima"; return(www); } if not,please tell me how is this possible?

Member Avatar for ArkM
0
118
Member Avatar for Clipper34

Hey guys, well first off i'm a new member here. My question is how do you go about killing/stopping a process? Thanks, Clipper34.

Member Avatar for Ancient Dragon
0
202
Member Avatar for JackDurden

Can I use getline to get two lines of string data? for example: [CODE]string line; string myfile; ifstream file; file.open(myfile.c_str()); while(!myfile.eof()) { getline(myfile, line) }[/CODE]

Member Avatar for Ancient Dragon
0
506
Member Avatar for Prathvi

Hi, With the same GetOpenFileName(...) I have one problem. when this displays the dialog with files, the time displayed in the date field will not be local time. Instead GMT time. How I can Change this. i.e in the mobile, time is set as GMT + 5.30 New Delhi. At …

Member Avatar for Ancient Dragon
0
80
Member Avatar for JustLearning

Here is the header file I was given to use [code] // // ministack.h // #ifndef MINISTACK_H #define MINISTACK_H const int MINI_STACK_SIZE = 5; // Fixed number of element in stack class MiniStack { private: int num; // Number of values stored in MiniStack char* stackPtr; // Pointer to array …

Member Avatar for JustLearning
0
161
Member Avatar for MylesDBaker

Hello everyone. I am trying to create a program that reads these values / strings from a file: 170 Lipstick 250 Orange Crush 350 Chickadee 450 Green Grass 550 Monaco 750 Toffee Crunch Then I am supposed to create a menu that prompts the user to provide either the number …

Member Avatar for MylesDBaker
0
152
Member Avatar for Dannielf

ok, so I just started looping today and the simpler programs are all right, but we got a pretty complex assignment which I am pretty lost on. here's the assignment: [I]Write a program that updates a person’s bank balance based on withdrawals and deposits. Ask the user to enter the …

Member Avatar for VernonDozier
0
162
Member Avatar for uncertainty

Im currently using turbo explorer as IDE, kinda new to it and was testing some functionalities and ended up trying to save and load images from MySQL. So I had this one to grab images from file to form: [code] void __fastcall Tcharacter::openClick(TObject *Sender) { OpenPictureDialog1->Execute(); EditBox1->Text = OpenPictureDialog1->FileName; Image1->Picture->LoadFromFile(EditBox1->Text); …

0
71
Member Avatar for monkey_king

I've been overloading some methods for a template class. This means I can write my code in this way. [CODE=c++] myClass var3=var2+4; [/CODE] Is it possible to do it the otherway around like [CODE=c++] myClass var3=4+var2; [/CODE] I know that the end result will be the same, I was just …

Member Avatar for monkey_king
0
149
Member Avatar for bbhe

Hi, I am trying to replace a few text strings in a text file (test.txt), and then makeing some spaces, for it to be easier to read Anyone have an example I can use, because I am new to C++ I just want to replace "word1" with red "word2", and …

Member Avatar for bbhe
0
153
Member Avatar for noadek

I'm working on a project graphical based authentication and i need to implement this with C++. I need to understand this concept and all the books i ve read, none has really explained it well. Please I need help and badly.

Member Avatar for Salem
0
249
Member Avatar for JackDurden

How do I input a string then output a vector from this function? The compiler doesnt seem to like "while(invector>>word)". [CODE]vector<string> example (string invector);//prototype vector<string> example(string invector) { string word; stringstream insert(invector); vector < string > vectemp; while(invector >> word) vectemp.push_back(word); for(int i = 0; i < vectemp.size(); i++) cout …

Member Avatar for Narue
0
121
Member Avatar for Malfunktion

I was wondering if anyone had some source code/snippets of code that can: - Move a a file (I guess copy -> paste -> delete old one) - Rename a file. - Locate whether a file is in a certain place? Im using XCode on a mac. Thanks

Member Avatar for Salem
0
37
Member Avatar for aloplop

Hello, I would like to know if I can invoke an applet method from C++. This method is loaded in a web browser. For example, the applet is called app and I want to invoke "app.Zoom(2)". Thanks.

0
52
Member Avatar for OnIIcE

Hello! I’ve started a project that allows users to edited wav files (flange, distortion) and but them in a sequence and make a loop. I want to be able to visualize the actual sound wave of the file (like if you dropped a sound file in Audacity (and then in …

Member Avatar for skatamatic
0
222
Member Avatar for masterjiraya

[B]filename:[/B] [COLOR="Red"]main.cpp[/COLOR] [CODE=cplusplus] #include <iostream> using namespace std; int main(); using namespace std; #include "BinaryTree.h" int main() { BinaryTree<int> tree[8]; tree[1].makeTree(1, tree[0], tree[0]); tree[3].makeTree(3, tree[0], tree[0]); tree[2].makeTree(2, tree[1], tree[3]); tree[5].makeTree(5, tree[0], tree[0]); tree[4].makeTree(4, tree[2], tree[5]); tree[7].makeTree(7, tree[0], tree[0]); tree[6].makeTree(6, tree[4], tree[7]); cout << "Preorder: "; tree[6].preorder(); cout << "\n"; cout …

Member Avatar for masterjiraya
0
151
Member Avatar for bonnie1702

Hi there! I am just starting out in c++ and so far, its going ok. I have a small problem in a simple program that is frustrating me, so I am hoping someone will point me in the right direction of where I've gone wrong. The program basically prompts the …

Member Avatar for bonnie1702
1
221
Member Avatar for Seba Sama

Hi everyone! I'm kinda n00b in C/C++, All I ever did were some basic programs for some .txt files manipulation. Last time I was working in BC 3.1, about for years ago. Now I got Borland Turbo C++ Explorer 2006 and is a little hard for me to start a …

Member Avatar for Sky Diploma
0
154
Member Avatar for kux

Compile this code with MSVC2005 [CODE] unsigned short x = 20; unsigned short y = 20; for ( unsigned long i = 0; i < x * y ; i++ ) { cout<<i<<endl; } [/CODE] and u get warning C4018: '<' : signed/unsigned mismatch why? i mean, it all runs …

Member Avatar for kux
0
133
Member Avatar for aloplop

Hi all, I have developed an application in C++ using Borland Builder 6. In this app I load a html file which contains an applet stored in a wifi robot so that in my app I receive the image from an IP camera installed on it. The fact is that …

0
58
Member Avatar for shamila08

Hello, dear all, here is my algorithm. i'm trying to reverse the array but its not function and not loop. [code=cplusplus] #include <iostream> using namespace std; void initial(int *v, int N) { int i; for(i=1; i<=N; i++) v[i] = i; } void write (int *v, int N) { for (int …

Member Avatar for Nick Evan
0
160
Member Avatar for dodo_ind

Hi all I'm using a 'STRING' variable to store the entire contents of a file. Is there any possibility of buffer overflow if the content of the file is large? (eg: say size of the file is 30MB). Thanks in advance

Member Avatar for Alex Edwards
0
202
Member Avatar for Hinche4

Hi guys, I'm new to this but I have no idea what is wrong with my code and I'm going insane trying to figure it out and its due very soon! I would appreciate any help you can give me! Here's my code: [code=cplusplus] #include <iostream> #include <iomanip> #define ROWS …

Member Avatar for ArkM
0
314
Member Avatar for defychaos

Hi friends :P I'm needing some help on an assignment. I'm really not sure about all the argument-passing and structure references I have been assigned for my C++ class. Any help is greatly appreciated. I'll continue to work on it in the meantime, but I cannot get it to compile …

Member Avatar for skatamatic
0
120
Member Avatar for vadan

HI I have created an object pool in shared memory each object encapsulates another object which in turn has a socket object which is a pointer Now my question is, should the socket object be created in the same memory region (using overloaded new) as that of pool object or …

Member Avatar for Duoas
0
98
Member Avatar for amt_muk

Hello Friendz, Suppose I have a program like [code] // A.cpp int main() { if(some_condition) return 1; return 0; } [/code] Now from another program I want to run the above program, like [code] //B.cpp int main() { ... ... system("A"); ... ... return 0; } [/code] Here how can …

Member Avatar for Duoas
0
373
Member Avatar for vadan

Hi I want to create an array as shown in the class below everything is working fine, but at the end of execution of the program, there is a memory fault Please help me in finding out the problem [code=cplusplus] class a { int i; int arr[]; public: a(); ~a(); …

Member Avatar for vadan
0
139
Member Avatar for wiz83

hi you please tell me how to call javascript files from c++ code?i know this(iam not 100% sure) that you first call html files,then from ther you call javascript files.

Member Avatar for ~s.o.s~
0
143
Member Avatar for Trekker182

I'm taking the time from an accessor function and if it's from 0-9, so it displays correctly the hour time position, I have the following statements in my main body: [CODE] if (clock1.getHour() == 00) cout<<"The hour of clock1 is 00"<<endl; else if (clock1.getHour() == 01) cout<<"The hour of clock1 …

Member Avatar for VernonDozier
0
4K
Member Avatar for JackDurden

How do I use a pointer with a 2-dim array? I am converting string to char array. char x[25][100]; const char* A= x; A= x.c_str();

Member Avatar for Ancient Dragon
0
105
Member Avatar for Dinomike1000

I have been working through the book [U]Windows Game Programming for Dummies[/U] and so far it has been excellent. I am about half way through the book and I am planning on finishing. However, the books is from 2002 and it uses DirectDraw7 for the graphics component of DirectX. It …

0
100
Member Avatar for tedobg

Hey guys.I am not sure that what I want to do is possible but if it is can someone help me out... Well I want towrite a program which waits for input for a curtain amount of time and if no input is received it continues its execution.I will be …

Member Avatar for tedobg
0
271
Member Avatar for volscolts16

I have a problem with the new program, it compiles and and it debugs, but when I get to the command lines and enter my function it gives me a debug assertion failure. We are supposed to be finding the sum of the area of rectangles used for close approximation. …

Member Avatar for skatamatic
0
105
Member Avatar for Jennifer84

I have put values into 6 elements of the vector Numbers like below. What I wonder is if there is any function to check for the Highest value for a given range of the vector. Say I want to find the highest value from elements [3] to [5] wich in …

Member Avatar for stilllearning
0
141
Member Avatar for Natrax

learning C++ and going through some codes. I'm puzzled by how the following piece of code works. It's from the msdn library as part of an example, and I know that the code works, but I'm puzzled by how the "%" sign works. [code=cplusplus] #include "stdafx.h" #include <stdio.h> int main …

Member Avatar for Natrax
0
76
Member Avatar for pads

Customer and Pensioner. Pensioner should be a subclass of Customer. These classes should be in their own files with separate header files. Details are below. Create a third class called Manager. The manager file can contain the main function. The Manager class should contain member functions that read a text …

Member Avatar for skatamatic
0
229
Member Avatar for Elmo_loves_you

Hi Guys, Im more familiar with coding in C# ... can someone please help me to convert the line highlighted below into VB.NET Much appreciated [code] private int file_count = 0; /// /// Get the file count of a given directory recursively. /// public void GetDirectoryFileCount(string dir) { dir = …

Member Avatar for Jx_Man
0
219

The End.