49,756 Topics

Member Avatar for
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
157
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
175
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
139
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
59
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
192
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
157
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
204
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
178
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
238
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
269
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
102
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
80
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
136
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
149
Member Avatar for Sundayy

Hello Everyone: its nice to find this site because I'm just starting to learn C++ and I would welcome any help I can get. Thanks All!

Member Avatar for debasisdas
0
38
Member Avatar for wantsree

Hi folks, I'm a beginner in c++. The other day was trying to multiply 2 matrices using friend function. The program did run ,but the result showed some garbage values. plz help.. #include<iostream.h> class matrix { int a[10][10],b[10][10],d[10][10],r,c,l,m; public: void read (void); void display (void); friend void multiply1 (matrix m1); …

Member Avatar for wantsree
0
1K
Member Avatar for Mayank23

i just downloaded qt and i dont know how to build in qt, it keeps saying: Could not find make command: mingw32-make.exe in the build environment Error while building project case (target: Desktop) When executing build step 'Make' Could not find make command: mingw32-make.exe in the build environment Error while …

Member Avatar for bramsever
0
560
Member Avatar for lochnessmonster

im curious as to if i were to do inline assembly such as [code] __asm { mov eax,0 // more assembly here..... } [/code] does anyone know of how i can calculate how many bytes the assembly code above i produced will use up in my exe? im wanting to …

Member Avatar for thelamb
0
186
Member Avatar for DaniwebOS

So I've been working on this project for quite awhile now and I can't seem to figure out how to fix all of my errors. If you could run the program, it will appear as 17 errors. So far I don't know where I could of went wrong. Any help …

Member Avatar for jonsca
0
117
Member Avatar for becool007

Hey Daniweb Community, I enter in the following code into a header file: [code=c] bool isCreated; [/code] And as a result I get the following error: [COLOR="Red"]error: expected '=', ',', ';', 'asm' or '__attribute__' before 'isCreated'|[/COLOR] Any suggestions or information on how this problem is occuring? Computer Specs: Windows 7 …

Member Avatar for Ancient Dragon
0
94
Member Avatar for arguav74

Hi everyone, I am new to C++ and I'm having difficulty getting this program to work to calculate Haistone numbers. So please - any advice or solution as to what I'm doing wrong would be greatly appreciated. The program is to take two numbers, and then for each number in …

Member Avatar for Ancient Dragon
0
365
Member Avatar for akase2010

[CODE]#include <iostream> #include <cstring> #include <cctype> using namespace std; class Car { private: int YearModel; int Speed; string Make; public: Car(int, string, int); string getMake(); int getModel(); int getSpeed(); void Accelerate(); void Brake(); void displayMenu(); }; Car::Car(int YearofModel, string Makeby, int Spd) { YearModel = YearofModel; Make = Makeby; Speed …

Member Avatar for akase2010
0
136
Member Avatar for juangalvez4

Hi guys, I am having a bit of trouble. I've come to realize that my book does a poor job to explain a lot of concepts in detail. I am trying to use functions in the folowing code. [CODE]#include <iostream> //For cin and cout using namespace std; int main(void) { …

Member Avatar for juangalvez4
0
118
Member Avatar for welp

b.cpp [CODE] #include"a.h" #include"a.cpp" int main(){} [/CODE] a.cpp [CODE] #include"a.h" a::a(): b(0) { } [/CODE] a.h [CODE] #ifndef A #define A class a{ int b; a(); }; #endif [/CODE] Getting; "1>b.obj : error LNK2005: "private: __thiscall a::a(void)" (??0a@@AAE@XZ) already defined in a.obj" when trying to compile. Using Visual Studio 2010, …

Member Avatar for Ancient Dragon
0
191
Member Avatar for vincezed
Member Avatar for L3gacy

Hey everyone, My problem is that in my program below I made an indefinite loop for comparing strings and values, my problem is on line 60 & 61, the loop automatically accepts whichever if statement is on line 60 when I test for an uppercase and lowercase char, as soon …

Member Avatar for L3gacy
0
230

The End.