49,766 Topics

Member Avatar for
Member Avatar for delle

I wrote a little test program to try to figure out some problems I am having in another program I'm working on. Code: [CODE]# include <iostream> # include <string> using namespace std; void ahoy(string nameEntered) { cout << "Ahoy, " << nameEntered << "!" << endl; } int main() { …

Member Avatar for Duki
0
208
Member Avatar for DAlexNagy

I am learning to write C++ code to access data in a MySQL database. My goal is to use a separate class to control the database access so I can use this class elsewhere. To facilitate my learning, I'm working on simple code to connect to a database (success!) and …

Member Avatar for DAlexNagy
0
502
Member Avatar for Babaty

Guys can u check this one out ? Q1: design a system that will read students information, display them in a table form, and implement some operation on them. The system must show the following: ========================================================================= Do you want to add new students? Do you want to display the student …

Member Avatar for Fbody
-2
88
Member Avatar for Sismetic

Im trying to do a screen-flashing application that flashes the screen depending on the audio(like an audio visualizer, but instead of a visualization like bars or something like that, just flash the screen). I already made the music player and know how to make the widget get full screen and …

Member Avatar for Kanoisa
0
235
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
448
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
259
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
475
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
181
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
77
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
107
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
86
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
66
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
91
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
85
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
184
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
85
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
83
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
86
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
201
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
178

The End.