49,762 Topics

Member Avatar for
Member Avatar for unsureandunclea

Hello, i'm currently creating a program that allows the user to input a sentince and then the program compares each word to the array to see if there is any matches. The program also is able to sort using quicksort and other sorts. however, i am not sure how to …

Member Avatar for Kanoisa
0
124
Member Avatar for techno2007

Hi all, I want to solve the dining philosopher problem in c++,linux. But i don't get any clue. Can anybody help me to solve this. I know the problem theritically very well. But having confusion to implement it. Thanx in advance.

Member Avatar for techno2007
-1
85
Member Avatar for ze_viru$

I've just started learning c++,so i want to take any challenge concerning c++.My question is where do i start when drafting a game program.Please ppl help me out.

Member Avatar for ruwaiz1028
-3
3K
Member Avatar for jsburkdc

I have a homework assignment that requires the user to input two equations from the keyboard. The user can enter any letter of the alphabet but each equation can only have a total of 26 letters. I created a class for the equations and I was able to validate the …

Member Avatar for prvnkmr449
1
442
Member Avatar for Jixz

To make a long story short here is the situation I'm in right now: I have one thread downloading a file from the web to a local file. I need the other thread to get the local file's current size AS its downloading. So, what would you guys recommend to …

Member Avatar for Ancient Dragon
0
151
Member Avatar for TGeorge824

I'm taking a graphics class, and we have just started using OpenGL. My professor gave us a simple program that draws a purple line, that we were supposed to compile. I took it home and tried to compile it, and i got a lot of undefined symbol errors. Any help …

Member Avatar for mike_2000_17
0
258
Member Avatar for scru

Is there a short way to determine how many digits are in an integer? I'm new to C++, and writing a program that's supposed to a number in one column, and its square in the next. I'm using setw to manipulate the width of the coulms. Here is those code: …

Member Avatar for Student level
0
474
Member Avatar for super-duper

//************************************************************************************* // This program keeps track of speakers' bureau. // It displays a menu, where the user can add info, // view the info of another speaker that's already in there, // and etc. //************************************************************************************* #include "stdafx.h" #include <iostream> #include <iomanip> #include <cstdlib> using namespace std; //************************************************************************************** // this is …

Member Avatar for super-duper
0
180
Member Avatar for onako

I wonder whether there is a faster way (faster then the obvious one a=a*a) to square the content of a vector of floats. I remember that bit shifting could be used somehow, but I'm not sure whether this works for floats. Any suggestions on how to achieve this are welcome …

Member Avatar for NathanOliver
0
76
Member Avatar for onako

My templated function look as follows: [code] template <typename MatTypeOne, typename MatTypeTwo> void funct(MatTypeOne& m1, MatTypeTwo& m2) { //here I would need to check whether m1 and m2 are of the same "type", //meaning that MatTypeOne is the same as MatTypeTwo } [/code] What is the way to check whether …

Member Avatar for LordNemrod
0
112
Member Avatar for XodoX

It's a program that works sort of like a lexical analyzer, but it's just supposed to pull any given data from a .txt file and display it. Nothing else. I'm not satisfied with the array I have so far. /**************************************************************** Array holding all keywords for checking. *****************************************************************/ char *keywords[]={"procedure","is","begin","end","var","cin","cout","if", "then","else","and","or","not","loop","exit","when", …

Member Avatar for LordNemrod
0
106
Member Avatar for rtdunlap

[CODE] #include <iostream> using namespace std; int main() { char a = 0, b = 1, ch1, ch2, ch3, ch4, chsum; float num1, num2, num3, sum, avg; cout<<"Enter Character 'a' or 'b': "; //asking user to enter character a or b cin>>ch1; if (ch1 == a) { cout<<"Enter three floating-point …

Member Avatar for LordNemrod
0
122
Member Avatar for ganesh_IT

Hi guys, what is the deference between ASSERT macro and Exception handling in cpp

Member Avatar for LordNemrod
0
73
Member Avatar for NervousWreck

Hi, I'm kind of embarassed to be asking this since I should be able to figure this out by now, but I'm writing a program to sort a vector of objects alphabetically by a string member variable. Can someone help me figure out why the bubble sort below won't work? …

Member Avatar for Ancient Dragon
0
85
Member Avatar for ToiNKieZ

example output: Meter number is: 124123ABC231 "what should i use to define something like that.... TurboC newbie here...

Member Avatar for Ancient Dragon
0
65
Member Avatar for DeweyFinn

I wanted to know if there is such a way to declare a variable at runtime or create a dynamic variable. I've done this in Python, but I didn't know if C++ allows this. Maybe I'm not explaining it that well so I will give an example. Say I have …

Member Avatar for Ancient Dragon
0
90
Member Avatar for perroned

Hello DaniWeb, its Danny here :-) In my program I will open several web pages in IE or default browser. I already know how to do that. But I wuld REALLY like to be able to open a URL in an already open page. Like instead of always opening a …

Member Avatar for ToRtUgOxX
0
70
Member Avatar for asa88

i made a vector class "MyVector" inherited from a base class "arrayList" which is derived from a base class linearlist. whenever i compile i get a fatal error: [COLOR="Red"]LINK : fatal error LNK1561: entry point must be defined[/COLOR] [CODE]// abstract class linearList // abstract data type specification for linear list …

Member Avatar for asa88
0
216
Member Avatar for afizaex

Help me to build this program by using Turbo C++, thank you; User will enter car type and package of car based on the following; ------------------------------- TYPE...PACKAGE..PRICE.........TAX _______________________________ CAR1.......a............24000.........150% .................b............28000.........150% _______________________________ CAR2........c............35000.........200% .................d............37000.........200% .................e............41000.........200% ------------------------------- This program will calculate new price for the type of cars after being taxed. This …

Member Avatar for afizaex
0
342
Member Avatar for nhidman

can someone give a sample code in this include? we're currently working on voice scrambling program. but it's flushing out errors. thanks!

Member Avatar for nhidman
0
83
Member Avatar for qinise4

I am using Visual Studio 2010 C++ and its giving me an error "bad allocation" if I increase the array size t0 40 000 by 35 000, I am new to C++ not sure what to do. [CODE]// SWTest.cpp : Defines the entry point for the console application. // #include …

Member Avatar for Ancient Dragon
0
183
Member Avatar for malvi

Hello, My work is like making interface with visual studio, like preparing GUI for rs 232. For that i have to purchase Microsoft Visual Studio. can anyone tell me which version is suitable for me to purchase ?

Member Avatar for Ancient Dragon
0
84
Member Avatar for oscarp

Hi all, I'm developing a library. I would like that this library could make differents callbacks to the user part. Untill now, I had the simplest way to do it, I had stored a pointer to the user class and I was making calls when something happened, but with this …

Member Avatar for Ancient Dragon
0
82
Member Avatar for daviddoria

Can anyone explain why this would fail: [code] assert(cap >= 0); [/code] But this passes? [code] if(cap < 0) { exit(-1); } [/code] That is, the assert is triggered, but if I replace it with conditional, the exit() function is never called. Thoughts? Thanks, David

Member Avatar for daviddoria
0
85
Member Avatar for BryantFury

so i stumbled upon a few 'challenge questions' and decided to have a go. it should be my level. so anyways the question asked me to produce a code that makes me- input 2 numbers. the numbers get added ASWELL as the un numbers inbetween BUT excluding the numbers u …

Member Avatar for BryantFury
0
200
Member Avatar for Smithy566

Hi all, I'm trying to create a method in [B]managed c++[/B] which will convert an int to a string representation of binary. I have done this in C# before, but I can't work out how to do it in Managed C++ Below is the code from my C# effort that …

Member Avatar for Milton Neal
0
177
Member Avatar for PixelExchange

Does anyone know how one would be able to replicate photoshop's resolution option? I normally do not mess around with resolution.. but recently.. I changed the resolution value accidentally and had some pretty astounding results. For those of you who have never used photoshop before.. the resolution option simply increases …

Member Avatar for PixelExchange
0
149
Member Avatar for Ee Juan

I can do the pattern totally for * or number only but how to use both together for pattern? Here is the pattern i want to do. 0 * * 0 1 2 * * * * 0 1 2 3 4 * * * * * * * * …

Member Avatar for mrnutty
0
101
Member Avatar for TotoTitus

Hello everyone, i'm porting an application from C# to C++, and i find the syntax and all that of C++ rather cumbersome (though C/C++ was my first language). I have a very specific question, and another few more-or-less general ones. The specific question: In C#: [CODE] Bitmap image; BitmapData ImageData; …

Member Avatar for Milton Neal
0
1K
Member Avatar for ChaseRLewis

I'm working on creating some 3d tools for helping me in my game making hobby. Its going along fine, but I need to save a model class with a non-standard size (model with 4 textures and 10000 vertices is larger than one with 1 texture and 1000 vertices) to memory …

0
44

The End.