49,766 Topics

Member Avatar for
Member Avatar for AnGeL_69

im wondering if any1 can send me the function that evaluates the value of a postfix expression in c++<<using stacks>>... i really need it as soon as possible.. :sad:

Member Avatar for khanmj89
0
250
Member Avatar for jaymo'o

hi everybody. Im very well a beginner and I cant quiet grasp classes. I found that this topic is all over forums and I have decided to give it a whirl and I am stuck. Would anybody out there help?

Member Avatar for rxlim
0
148
Member Avatar for hveed

hi all, I am trying to create a pointer to a member of a struct and then do a boolean comparison to see if there is currently anything in that member. here is what I have so far: card* openPtr = opencells; char* rankPtr; rankPtr = (*openPtr).rank; cout<<" Free Cells …

Member Avatar for rxlim
0
107
Member Avatar for arthurav

The subject of my bachelour thesis is "Solving linear programming problems using parallel algorithms". I will create a library for solving different kinds of problems (simplex, branch and bound and so on). I want to use OpenMP or PThreads locally and OpenMPI in the network. Which one would you recommend …

Member Avatar for arthurav
0
128
Member Avatar for crapgarden

Just to clarify, the text I'm reading defines the lifecycle of a program as: -idea -plan -source code -object file -executable. In gaming terms would this be comparable to: -an Italian plumber goes on an adventure to save a princess from evil turtles and mushrooms. -sketch out level designs. Write …

Member Avatar for jonsca
1
184
Member Avatar for jkoske
Member Avatar for altXerror

i'm trying to make a password system for my program. a user will input upto 20 chars, and if the password is correct, load the main program and if not, loop until the user gives up or enters the correct answer. here is the code [CODE] void Password(char pass); int …

Member Avatar for pseudorandom21
0
188
Member Avatar for pseudorandom21

It may have only been Visual C++ 6.0 or something, but I think I remember needing to add curly braces after a switch's case label to declare variables, is this still true with VS2010 and C++? ex: [code] switch( 1 ) { case 1: { int a; //<-- ok } …

Member Avatar for Saith
0
78
Member Avatar for lochnessmonster

Im currently wanting to open a file on my Hard Drive, and be able to scan it's contents to see if it has any bytes that match a specific pattern of bytes which i have stored in a byte array. Im curious as to how i can do this? will …

Member Avatar for lochnessmonster
0
214
Member Avatar for tlwtheq

What is wrong with this and how do I fix it? Thanks. [CODE] template<typename T> class Array { public: Array(unsigned arraySize): data(0), size(arraySize) { if (size > 0) data = new T[size); } ~Array() { if (data) delete[] data; } void setValue(unsigned index, const T& value) { if (index < …

Member Avatar for VernonDozier
0
124
Member Avatar for Progr4mmer

I'm trying to make a program where you enter the number you want to find primes up to which then lists all the primes up to that number... But I enter 100 then it just sits there... Here's my code so far: [CODE]#include <iostream> #include <cmath> int prime(int); int main() …

Member Avatar for Progr4mmer
0
195
Member Avatar for Progr4mmer

could someone please explain to me the differences of these languages (C, C++, C#) and when i would use them. (i know a little C++)

Member Avatar for ddanbe
0
108
Member Avatar for JordanHam

I have read many different threads about how it is not possible to delete values from an array, but I need to find some way to do this. I am making a program that involves a bottom up approach algorithm where it pairs off data segments, finds the best segments …

Member Avatar for Fbody
0
158
Member Avatar for VasquezPL

I'm trying to write a program which will generate templates in html.. I try to make a menu in visual c++, rest of code was written in c++ (console). so I have 2 problems... [B]1st PROBLEM[/B] I designed nice clean menu with drop-down menu containing 3 options AVAILABILITY DEGRADATION UNAVAILABILITY …

Member Avatar for VasquezPL
0
1K
Member Avatar for blessed87

I have the following code: [CODE]for (int w=0; w<10; w++) { //some lines of code unsigned long num = x.to_ulong(); cout << "Decimal form is: " << num << endl; } [/CODE] Now what I want is, to make a matrix which will have these values of num, column wise. …

Member Avatar for djarn
0
177
Member Avatar for gregarion

Hey guys , i need some help in understanding this coding. This is a client server code which i got off the internet . The problem i am facing is that when you run the server , the server will continously wait for incoming connections . I would like to …

Member Avatar for djarn
0
146
Member Avatar for dpreznik

Dear experts, In my application, I am using a custom control that is a GroupBox and a CheckBox instead of a common caption. I got the control here: [url]http://www.codeguru.com/cpp/cpp/cpp_mfc/article.php/c4149[/url] I had to change the code to allow the checkbox to have multiline text: [CODE] CRect rc; GetWindowRect(rc); // Get the …

0
60
Member Avatar for blessed87

[CODE]std::vector<std::vector<unsigned long> > matrix(15); // 15 rows typedef std::vector<std::vector<unsigned long> >::iterator it_type; it_type row = matrix.begin(); for (int w=0;w<10;w++) { //some lines of code unsigned long num = x.to_ulong(); cout <<"Decimal form is: " << num<< end; // if we've hit 15 items in the current row (i.e. 15 columns), …

Member Avatar for WaltP
0
203
Member Avatar for crapgarden

Here's a defined enumeration: enum shipCost {FIGHTER_COST = 25, BOMBER_COST, CRUISER_COST = 50}; Then they do this which I don't understand: shipCost myShipCost = BOMBER_COST; My question is why don't you just do the following instead? int myShipCost = BOMBER_COST;

Member Avatar for crapgarden
0
167
Member Avatar for ntrncx

Hey i am beginner and i read a book about c++,and i like to do all the exercises alone until i find alone the solution. but one of the topics that give me a hard time is recursions. i am on an exercise with the following code. [CODE]#include <iostream> using …

Member Avatar for alaa sam
0
206
Member Avatar for realproskater

Im getting this error while im working on my pig latin code and have no idea what it is referring too. so here is the error and my code. ill specify the piece of code that is erroring. [code] #include <iostream> #include <fstream> #include <string> using namespace std; bool isVowel(char …

Member Avatar for realproskater
0
182
Member Avatar for eduard77

Thank you for your help so far.I try now to move on with my vector but now comes the hardest part. All the values that the float vector receives must combine somehow that the value of their addition do not overcome 12. So in other words even if I have …

Member Avatar for eduard77
0
250
Member Avatar for buniferous

I promise I read the Read This First post and also searched for relevant threads, but I didn't have any luck. I'm taking my first C++ class, and the instructor hasn't been much help when it comes to fundamental things like what compiler we should use, where to get it, …

Member Avatar for buniferous
0
279
Member Avatar for ChaseRLewis

I Created a Look_up table class but when I test it with sin() and cos() it is actually slower than stdlib math's sin. This surprises me by a lot. [CODE] inline double MATH_TABLES::GetSind(double& value) { return mp_Sind[(static_cast<int>(value/m_SinPrecisiond)]; } [/CODE] mp_Sind is simply an array of doubles. This is the non-Lerp'd …

Member Avatar for mike_2000_17
0
2K
Member Avatar for pseudorandom21

I'm a college student, about to have an associates degree and start working on my Bachelor's for CS. I have a project that I've been working on for a while now, and I'm thinking about making it open source, and hosting it on sourceforge. The reason I would do so, …

Member Avatar for mike_2000_17
0
105
Member Avatar for HeartBalloon

Hi, I've just installed netbeans, cause I found out I need to work with C and windows doesn't allow the use of pid_t and fork(). Awesome Job, Gates. Anyway I've found this pretty compiler which is NetBeans. In pair with cygwin it should work out all the C stuff I …

Member Avatar for papanyquiL
0
81
Member Avatar for realproskater

Here is my problem: Write a program that reads in a text file and converts it to pig Latin. i.e. if the first letter is a consonant, move it to the end and add “ay” to the end, if it is a vowel add “way” to the end. Here’s an …

Member Avatar for realproskater
0
1K
Member Avatar for airerdem

Hi, [CODE]for(i=0;i<10;i++) { for(j=0;j<10;j++) { if() { Now I want to exit from j loop and continue from i loop. } And now if it is wrong I want to continue from j loop. } }[/CODE] Actually I tried break in if statement but it did not help.

Member Avatar for airerdem
0
106
Member Avatar for amitapm

Hello, Please help me in my query below: Code snippet 1: [code] Employee *e1 = new Employee(this); e1->setX(); e1->setY(); [/code] Code snippet 2: [code] Employee e1 = new Employee(); e1->setX(this); e1->setY(this); [/code] "this" can be anything. Example, this code is present in a method of another class say Organization. so, …

Member Avatar for amitapm
0
137
Member Avatar for juangalvez4

[CODE] #include <iostream> #include <string> #include <cmath> #include <iomanip> using namespace std; int main () { char op= ' '; int cstart, cend, increment, fstart, fend; cout << "This program converts and calculates the increment between" << endl; cout <<"celsius and fahrenheit temperatures"<< endl; cout << endl << endl; op …

Member Avatar for VernonDozier
0
152

The End.