49,766 Topics
![]() | |
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() { … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. | |
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. | |
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 … | |
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 … | |
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 … | |
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: … | |
//************************************************************************************* // 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 … | |
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 … | |
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 … | |
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", … | |
[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 … | |
Hi guys, what is the deference between ASSERT macro and Exception handling in cpp | |
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? … | |
example output: Meter number is: 124123ABC231 "what should i use to define something like that.... TurboC newbie here... | |
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 … | |
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 … | |
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 … | |
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 … | |
can someone give a sample code in this include? we're currently working on voice scrambling program. but it's flushing out errors. thanks! | |
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 … | |
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 ? | |
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 … | |
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 | |
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 … | |
![]() | 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 … |
The End.