51,593 Topics

Member Avatar for
Member Avatar for Darth Vader

I am using this code inside a button. When clicking the button I browerDialog appears. I can now browe to a folder and press OK. The Directory will be inserted in the textBox1. What I now want to do is this: Inside of this Folder I have a .txt File. …

Member Avatar for Darth Vader
0
177
Member Avatar for number87

im trying to create a 2D array using a random generator but the compiler keeps giving me compiling error no matter how i modify the calling function [CODE]#include <iostream> #include <ctime> using namespace std; const int MAX = 4; void constructArray (int a [][MAX], int); int main() { int a …

Member Avatar for Nick Evan
0
136
Member Avatar for arunpawar

I have downloaded the visual C++ express 2005.Actually i have no experience with the visual C++, i used to develop with Visual Basic earlier but i don't know some of the following thing: 1. How can i enable the line numbers in my source code? 2. Where can i find …

Member Avatar for Ancient Dragon
0
158
Member Avatar for arunpawar

The last version of DevC++ is released as beta 5.It is the only lightweight (comaprison to large download of VC++ express) IDE available for C++ with Stable release(Not like nightly build of Code::blocks).But,there are plenty of updates of mingw since then,so the outdated version inside the setup needs to be …

Member Avatar for Ancient Dragon
0
186
Member Avatar for Ashu@sym

Hi, I am having problem in compiling the following piece of simple code(it didn't work in any of the compilers VC++,GCC etc) [code] #include<iostream> using namespace std; int main() { while((char c = cin.get()) != 'q') cout<<endl<<"Character printed = "<<c<<endl; } [/code] ERRORS: expected primary-expression before "char" expected `)' before …

Member Avatar for vijayan121
0
162
Member Avatar for yoyoman3000

Hi guys, quick question for you. [code]for (i = 0; i < NUM_EMPS; i++) { cout << "First and Last Name: "; cin.getline( names[i], 31 ); for (index = 0; index < NUM_MONTHS; index++) { cout << "Hours worked in "; cout << months[index]; cout << ": "; cin >> …

Member Avatar for yoyoman3000
0
154
Member Avatar for memo_c++

Hello guys, I wanna write a program that count for me the number of each letter I have in a text file then I want to cout the words and count the number of repetition of each word. I was able to do it except for counting the repetition And …

Member Avatar for memo_c++
0
75
Member Avatar for shadowfire36

ok i have an assignement the assignment is to make a menu with these selection Write a program that displays a menu with the following choices to the user. A - Find the largest # with a known quantity of numbers B - Find the smallest # with an unknown …

Member Avatar for WaltP
0
128
Member Avatar for afg_91320

hi guys. its me again. after going thru my prblm i was able to get thru a few of the kinks. however, i still am having issues with the mathematical statements. my assognment is to to create a program that will calciulate the monthly payment along with the loan and …

Member Avatar for WaltP
0
90
Member Avatar for Mr.UNOwen

Hello, I was creating a game in java and a thought came to mind, would it be better to dump it all and start from scratch with C++. So my question is, with all the cons I've listed and all the other issues that you know, what am I better …

Member Avatar for Mr.UNOwen
0
108
Member Avatar for tb808kid

Hi! I'm just at the the research and design stage for my final college project, I'm just wondering what some more experienced programmers think is the best way to get started with simple graphics and sound. The program is really just going to be a scripting language (not sure if …

Member Avatar for tb808kid
0
163
Member Avatar for eli Naiman

I have been using VC++5 for a while. All of a sudden I am getting the following error: "msdev has caused an error in dm.dll" Can anyone tell me how to get rid of this. Thanks

Member Avatar for Ancient Dragon
0
54
Member Avatar for Sgt. Pepper

I bought the book C++ Primer Plus [url]http://www.amazon.com/C%2B%2B-Primer-Plus-Stephen-Prata/dp/0672326973/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1202680271&sr=8-1[/url] because i plan on learning the C++ language, but i can't really understand what it is trying to say when it is suggesting compilers. Can anyone give their feedback on the best compilers for beginners? And also, C++ is the best place …

Member Avatar for Sgt. Pepper
0
200
Member Avatar for olams

Hi, i am writing a program to manipulate polynomials. however, i am having problems with my root function. this function is meant to find the real roots of a polynomial using newton-raphson formula. please help me. [code] #include<iostream> #include <sstream> using namespace std; //A class to handle a list node …

Member Avatar for iamthwee
0
121
Member Avatar for glendavis

This is supposed to return the index of the first empty string in the array using recursion. Instead of returning the index of the FIRST empty string, this function I wrote returns the index of the LAST empty string. I have no idea how to search from the beginning of …

Member Avatar for VernonDozier
0
175
Member Avatar for noulmail2007

Hello, I need an email extractor which can extract me the email address from the specified ebay user I need.To give you a clue here is what I need.On ebay you know every user is registered with an email address but lately you cant view their email address.If any can …

0
44
Member Avatar for afg_91320

hello ive been working on this project for the past couple of days, and i keep on getting the same error. it tells me that the term will not evaluate a function with two arguments. please help me! thanks [CODE]#include <iostream> #include <cmath> using namespace std; int main () { …

Member Avatar for vmanes
0
84
Member Avatar for olams

hi, i wrote this program on polynomials and how to manipulate them. however, i am having a problem with my eval function. it is supposed to evaluate the polynomial at a particular number. however, whenever i call a.eval(2.0), i keep getting polynomial a. please help me look into this. [code] …

Member Avatar for olams
0
154
Member Avatar for kako13

Hi, I'm getting this error: Asig 2.cpp In function `void ManiMatrix()': 31 Asig 2.cpp expected primary-expression before "int" Asig 2\Makefile.win [Build Error] ["Asig 2.o"] Error 1 Here is how I'm calling it from main: customMatrix.checkIfMagic(); Prototype in the class: void checkIfMagic(int**); void matrix::checkIfMagic(int **arrayOfArray) {// function began } // function …

Member Avatar for kako13
0
153
Member Avatar for Gopala Krishnan

when i use a dynamic 2d char array using pointers, i dont get any errors but the program is not executed correctly... //Pro to enter and display strings using dynamic 2d char array. [code=c] #include<iostream.h> #include<conio.h> void main() { char **v; int s; cout<<"Enter size :: "; cin>>s; v=new char[s]; …

Member Avatar for VernonDozier
0
104
Member Avatar for atish00

Can anyone help me wiht the prog. arrange a 1D array in ascending order. No need for the prog. code just explain me the logic.

Member Avatar for Lerner
0
146
Member Avatar for noellieb

Hi all, i am trying to do a quadratic hashing but i am having some difficulties probably because i am not in the right logic.using this code: [CODE] #include <iostream> using namespace std; int find(int); void insert(int); const unsigned int size = 13; int load = 0; // number of …

Member Avatar for Narue
0
822
Member Avatar for sanzle

i am trying to pair a vector and an integer but [code] map<vector[i][j],int>m; m.insert(pair<vector[i][j],int>,(v[1][0],sum)); [/code] did not work??

Member Avatar for HackWizz
0
58
Member Avatar for nurulshidanoni

I want to do two-dimensional array.. STUDENT1 take 001, 003, 005,006 STUDENT2 take 005, 007, 009, 001 001 002 003 004 like this 001 0 2 1 .... 002 003 004 and I do a programming like below, but how to fill inside the { }? [code=c++] // -------------------------------------------------------------- // …

Member Avatar for Ancient Dragon
0
122
Member Avatar for narendra_jntu

Hi all Recently i started using dev-C++ 4. I dont know to work with dev-c++. Plz tell me how create c++ programs and running them. I am trying to explore the dev-c++ ide , but no use. so plz somebody tell me how to work with dev-c++. (If possible tell …

Member Avatar for Ancient Dragon
0
78
Member Avatar for LoloftheRings

Hi, I created an object to create buttons in console applications. But somehow, the program doesn't do much when it's checking if the button is clicked. I got this code from the internet, I could give the original code if you want to study it. I have stripped it down …

Member Avatar for LoloftheRings
0
522
Member Avatar for VersEtreOuNe

[B][COLOR="Red"]Value.h[/COLOR][/B] [code=c++] #ifndef VALUE_H #define VALUE_H #include <iostream> template<typename DataType> class Value { public: Value(DataType val); Value(const Value<DataType>& aValue); Value& operator =(const Value& aValue); Value& operator +(const Value& aValue); void SetValue(DataType val) { _value = val; } DataType GetValue() const { return _value; } template<typename DataType> friend std::ostream& operator <<(std::ostream& …

Member Avatar for VersEtreOuNe
0
114
Member Avatar for TheBeast32

Hi, i have been making a server for a client I made to connect to. I don't have a static IP, so I need a way for someone on another computer to connect to me without me telling the user what it is every time. I have tried to just …

Member Avatar for TheBeast32
0
99
Member Avatar for guitarrick

Desperately need help on how to proceed with the following project: Design and implement and ADT that represents a calendar date. Month, day, and year . Type int is o.k. e.g. 03/08/2008. Include operations that advance date by one day and display the date by using either numbers or words …

0
69
Member Avatar for sjcomp

Hello, I have a vector of callbacks and I'd like to execute them. This is what I do: [CODE=C++] typedef boost::function<void (void)> FCallBack; std::vector<FCallBack> c; // Execute every callback std::for_each(c.begin(), c.end(), boost::bind(&FCallBack::operator(), _1)); [/CODE] This works, but is there an easier way to do so? For some reason reference to …

Member Avatar for vijayan121
0
107
Member Avatar for blcase

i am trying to overload subtraction between two separate classes. Class Id is basically several strings such as the information of a voter database. Class Collect would be the collection of several class Id's in an array along with a total of Class Id's and the title of the collection …

Member Avatar for John A
0
145
Member Avatar for charles_wt

I have borland C++ compiler on my system.while generating random numbers in C++,though i have incuded #include<cstdlib> and #include<iostream> i get these errors 1.cannot open include file cstdlib 2.call to undefined function rand please help me with a solution

Member Avatar for WaltP
0
315
Member Avatar for Darth Vader

Hello everyone. I have attached a folderBrowserDialog1 to my Form1. To a button I will do a function. What I will do now is when I press the button, I want to open this folderBrowserDialog wich works fine. After this I will click on a folder wich contains *.txt Files …

Member Avatar for Darth Vader
0
237
Member Avatar for VersEtreOuNe

Hi. Need to know what's the difference when using Templates between: [inlinecode]template<class T>[/inlinecode] and [inlinecode]template<typedef T>[/inlinecode]

Member Avatar for VersEtreOuNe
0
253
Member Avatar for sgw

Hi, I'm trying to use the pow function. Extremely simple program like the following, but it never passed compiler: #include <iostream> #include <cmath> int main() { int a, b, c; a=2; b=3; [COLOR="Red"]c=pow(a, b);[/COLOR] cout << c; return 0; } Compiler would highlight the red part. What's wrong?:icon_rolleyes: Thanks in …

Member Avatar for sgw
0
656
Member Avatar for kartouss

[code=c++] // Input the plaintext in the array char d; string temp; ifstream myfile1 ("Plaintext.txt"); if (myfile1.is_open()) { do { for ( j=0; j<BC; j++) // BC=4 for ( i=0; i < 4; i++) { myfile1.get(d); a[i][j] = d; // plaintext } Encrypt(a, rk); /* strcpy(temp,a); // Code to write …

Member Avatar for kartouss
0
154
Member Avatar for abhi_elementx

Hi, I am using dev c++ 4.9.9.2 and I am new to DLLs. I am tryig to create a DLL which I am not creating thru the "DLL project" in dev cpp. Here are my three files: //dlltest.h [CODE] #ifndef _DLLTEST_H #define _DLLTEST_H #ifdef BUILD_DLL #define EXPORT _declspec(dllexport) #else #define …

Member Avatar for Duoas
0
166
Member Avatar for LoloftheRings

Hi, I've made a console Pong game. I've added some sounds but the sounds are about 10 external .wav sounds. It seems a bit like a mess when I send the game to somebody, and it's not really user friendly. I want these sounds to be included IN the .exe …

Member Avatar for Duoas
0
261
Member Avatar for Undertech

(Note: sizeof(character) == 68 bytes) I am having issues with fstream::seekg()/seekp(). It seems like when one is invoked to modify the get or put pointer, the other pointer follows it instead of staying in place. Example: [CODE=cplusplus] charfile.seekp(0,ios::beg); cout << endl << "Put pointer is at " << charfile.tellp() << …

Member Avatar for vijayan121
0
196
Member Avatar for nukem

when editing windows XPs explorer.exe using C:\windows\70 exporer.exe in safe mode in MSDOS where can i find START part Like in windows 98 its in the line 2390, but where can i find it in XP.

0
55
Member Avatar for sadaka

Hello all. I just recently started a project using directx for a paint program. I am new to directx programming and have not before program with it. The codes that I entered are the typical codes but with modifications to handle directx programming. They compile and link with out error …

0
43
Member Avatar for arby11886

I need some guidance on an assignment I'm working on for school. The objectives of this assignment are to read data from a binary file, use some basic class functionality, store objects in an array and produce a neatly formatting report. [code] #include <fstream> #include <iostream> #include <cstring> using std::ifstream; …

Member Avatar for WaltP
0
95
Member Avatar for jrkeller27

I am writing a simple program that reads in a plain text file (ignoring numbers/symbols) and stores each unique word and the frequency it appears in the text file. This information is stored in a multimap<string, int>. I want to sort the elements in the multimap so as to facilitate …

Member Avatar for vijayan121
1
118
Member Avatar for sjcomp

Hello, I have base class and a derived class if I want to use bost::bind in an algorithm to call a virtual function that is declared in the base class I have two options: [CODE=C++] struct Base { virtual void Go(){}}; struct Derived:Base { virtual void Go(){}}; Derived d; // …

Member Avatar for vijayan121
0
118
Member Avatar for TSharma

I am trying to use sort defined in algorithm in c++. I want to use it in vector string ( vector<string> vec) can we use it i vector string. here is my code [code=c++] #include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; int main() { vector<string> vec; vector<string> ::iterator it; string …

Member Avatar for TSharma
0
90
Member Avatar for arby11886

I need some guidance on an assignment I'm working on for school. The objectives of this assignment are to read data from a binary file, use some basic class functionality, store objects in an array and produce a neatly formatting report. [code] #include <fstream> #include <iostream> #include <cstring> using std::ifstream; …

Member Avatar for WaltP
0
116
Member Avatar for kenank

Can somebody explain to me "nested class templates" or give me some links about it and some codes ? I get this theme for a homework ! (nasty profesor)

Member Avatar for Jx_Man
0
59
Member Avatar for olams

Hi, please help me with this program that i am writing. i am writing a program to create a polynomial. i set the values, but whenever, i debug it, i get this: 4x^2 + 0X^1 + 0x^0 + which do not correspond to the values that i set it to. …

Member Avatar for WolfPack
0
195
Member Avatar for andyg55

My program initially asks the user to input 3 values, x1, x2 and x3. These get fed into a mathematical equation and come out of it the other side slightly altered. The program then prints to screen the new values of x1, x2, and x3. These x values must go …

Member Avatar for John A
0
151
Member Avatar for inocntreper

I have this project but i can't display the months by name, they only come by number. i am stuck can anybody help me? Thanks [code=c++] #include <iostream> #include <iomanip> using namespace std; int main () { string month_name; // Constants for package monthly rates const double PackageA_RATE = 9.95; …

Member Avatar for Lerner
0
101

The End.