49,756 Topics

Member Avatar for
Member Avatar for khelly

at first, plec correct me this one... [code] std::string explanation; // this upper coding char explanation; //after entering void to display if(item_code=='A') explanation='BABY WEAR'; else if(item_code=='B') explanation='CHILDREN WEAR; else if(item_code=='A') explanation='LADIES WEAR'; else if(item_code=='A') explanation='MENSWEAR';[/code] BABY WEAR and others was error, what should i put? plz correct my coding above …

Member Avatar for gusano79
0
163
Member Avatar for Reeseoo

Hi all new to this forum, just thought i'd post in here because i am having a bit of trouble with an assignment... basically i have this class in a header file called Product.h... [CODE] class Product { private: int _id; unsigned int _price; public: }; [/CODE] I access this …

Member Avatar for Reeseoo
0
519
Member Avatar for joydsouza90

:?: Is there any way, in Turbo C++, by which we can make the mouse disappear when it enters a certain area of the screen ? I have tried this but it doesnt seem to work completely.... ------------------------------------------------------------------------------------[code=c] void initmouse() { union REGS in,out; in.x.ax=0; int86(0x33,&in,&out); } void showmouse() { …

Member Avatar for sourabhjaiswal
0
1K
Member Avatar for sansalama

Hi all I have a program, which I can do and in that program the user can enter information if he had missed to enter it in the required field and he must to be informed about this option. [CODE]//verification of the PIN Edit6->Text = ""; int digits[10]; AnsiString egn …

Member Avatar for adityatandon
0
120
Member Avatar for nicprog

how to write this in c++??? while (Q not empty) { u = deleteMin (Q) for each v adjacent to u if (v is in Q and w(u; v) < key[v]) { key[v] = w(u; v); //decrease key T[v] = u; }}

Member Avatar for nicprog
0
97
Member Avatar for the_kitoper

I have a problem, whenever I attempt to use the following expression it returns -3. Can you please explain why this is? [CODE] int level = ((RoD * 10) - 50) / 15; std::cout << "Level = " << level << std::endl; [/CODE]

Member Avatar for LRRR
0
171
Member Avatar for Kunal0

Hi, I have a basic understanding of C++ and was creating something myself with a class of 6 integers and a string what I want to do is to be able to find the mode values for each of the six integers and strings I have instantiated a set of …

Member Avatar for ravenous
0
282
Member Avatar for thinkingofaname

hey im using vc++ clr to build my application...im using the datagridview, but im having some problems with it because its quite poorly documented in C++..i want to know a couple of things. 1... how to change the color and text of a single row header cell as well as …

Member Avatar for thines01
0
148
Member Avatar for Azmah

I'm looking at developing programs that run on the desktop, cloud (ie. web app), and other devices. I'm looking at how I can code this in C++ and be able to communicate to a server and/or to the client's computer. Is this even possible and do I need the server …

Member Avatar for Azmah
0
152
Member Avatar for thinkingofaname

hey i wanna make C++ program that makes music files but i don't want to use the beep function because that's to simple..and as far as i know doesnt save as a music file....i've looked at csound but that looks a bit to tricky..can u suggest any library's that have …

Member Avatar for thinkingofaname
0
169
Member Avatar for Labdabeta

I have been teaching myself algorithms and I am stuck with the AlphaBeta AI algorithm. I want to test my knowledge of it with a TicTacToe simulation. The thing is I want it to be easy to modify for any two player game and I cannot figure out how to …

Member Avatar for Labdabeta
0
166
Member Avatar for teha_toshio

i`ve done a few codes and i compile it so that i can review it but it got stuck when i want to assign a room. i dont know why.. can someone please help me to fix this please...[CODE]#include <iostream> #include <vector> #include <cstdlib> #include <set> #include <algorithm> #include <string> …

Member Avatar for teha_toshio
0
231
Member Avatar for manfredbill

please help new to c++ programming in this program am trying to input 5 students information and get there output but i got wired error {illegal structure operation} [B]please help [/B] #include <iostream.h> #include <conio.h> struct student { int no; char name[20]; float degree; }; void main() { student s; …

Member Avatar for LRRR
0
3K
Member Avatar for wanguard

This is the program I wrote for my CS project. Compiler is TurboC++. I initially added a lot of garbage code in it and am having a hard time cleaning it up. Can you guys please suggest improvements in the code below. Thanks in advance. [CODE] //STUDENT MANAGEMENT #include<conio.h> #include<fstream.h> …

Member Avatar for adityatandon
0
166
Member Avatar for daviddoria

I know there is an "assignable and copy constructable" requirement for objects in an STL container. For example, you cannot place an object with a const member into a vector. [code] #include <vector> // /home/doriad/Test/Test.cxx:3:8: error: non-static const member ‘const int MyClass::x’, can’t use default assignment operator // struct MyClass …

Member Avatar for mike_2000_17
0
163
Member Avatar for d3m0n

Recently I started working with game development and I came with a problem, when I started working with this SDL_image.h library and I can not understand why the program, does not display the image, screen just flashes and disappears, I can't figure out what's the problem. I am using Microsoft …

0
103
Member Avatar for daviddoria

If I want to expose an iterator to a class member container, I can do so like this: [code] class PatchCollection { public: // Iterator interface typedef std::set<Patch>::iterator iterator; typedef std::set<Patch>::const_iterator const_iterator; iterator begin() { return SourcePatches.begin(); } iterator end() { return SourcePatches.end(); } private: std::set<Patch> Patches; }; [/code] However, …

Member Avatar for mike_2000_17
0
207
Member Avatar for Karlwakim

Hi everybody, I am learning c++ and i want to develop GUI applications Is Directx efficient for GUI apps ? Not games, just gui software. thanks

Member Avatar for LRRR
0
149
Member Avatar for BDove

I'm having trouble finding how to write to a C++ WinAPI TextEdit control programatically. Here is my code for the TextEdit control: [CODE] case WM_CREATE: { OutputBox = CreateWindowEx(WS_EX_CLIENTEDGE, "EDIT", "", WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_MULTILINE | ES_AUTOVSCROLL, 10, 90, 410, 235, hwnd, (HMENU)OUTPUTBOX, g_hInst, NULL); break; } …

Member Avatar for BDove
0
210
Member Avatar for johnnydarten

Dear all, I'm a C++ beginner and I'm facing a problem with C++ program running on Dev C++ 4.9.9.2. The following program builds and compiles just fine however when I try to execute it it stops before getting any output. Actually the line causing the problem might be the "y_pos[][]" …

Member Avatar for johnnydarten
0
1K
Member Avatar for daviddoria

I have a class called PatchCollection. It is in charge of creating a bunch of Patch objects. It stores them in a member variable of type std::set. Now I want to loop over all of the patches from outside the class. That is: [code] MyClass { PatchCollection Patches; void DoSomething() …

Member Avatar for ravenous
0
133
Member Avatar for bohling

OK, first off I have figured out the prime number algorithm...I guess. What I am needing help with, or wanting the answer to, is how to count how many primes are being displayed. To wit: Enter a Number: 10 There are 4 Primes. The Primes are: 7 5 3 2 …

Member Avatar for bohling
0
224
Member Avatar for chhabraamit

Hello guys , I am looking for a HTML parser in C/C++. I am trying to make a movie rater , which take name of movies from a folder and stores it in a file , then sort it according to their rating on net. So ,I am thinking to …

Member Avatar for thines01
0
513
Member Avatar for tobby501

Hey guys! I'm new to programming and C++ is my first programming language. I have studied books on the language but I know the real job is the application of what I have been studying. I am planning to do a project this semester that will help me to actually …

Member Avatar for tobby501
0
128
Member Avatar for adityatandon

Hey guys, I'm having this problem of trying to open shortcuts, i.e (.lnk) files and am also trying to open powerpoint slideshows (.pps) files through turbo c++. It didn't work so what i did was write a .bat file to open those programs and then converted that .bat file to …

Member Avatar for adityatandon
0
893
Member Avatar for Karlwakim

Hi everybody, i am new to c++ and wanna know why pointers are useful ? Why would i use them ? For what ? THANKS

Member Avatar for rubberman
0
163
Member Avatar for a.muqeet khan

guys i was working on the link list program and its is encountring a problem its says some thing like un handled exaption handling acess writing location error i have no idea howto over come it so i thought may be u guys might help me with it here is …

Member Avatar for LRRR
0
195
Member Avatar for Vermouth

Hi! I'm making a table. I originally have some names. [CODE] #include <iostream> #include <cstring> using namespace std; char passengerName[100][100]; void main() { strcpy(passengerName[1], "Peter Tam"); strcpy(passengerName[2], "David Morris"); strcpy(passengerName[3], "Susan Leung"); strcpy(passengerName[4], "Timothy Kin"); strcpy(passengerName[5], "Mary Poon"); strcpy(passengerName[6], "Pretty Godson"); strcpy(passengerName[7], "Tammy Leung"); strcpy(passengerName[8], "Hugh Boss"); strcpy(passengerName[9], "John Cheng"); …

Member Avatar for adityatandon
0
586
Member Avatar for HASHMI007

[CODE]// Sorting Techniques.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include<iostream> using namespace std; void Bubble(int x[],int n ){ int temp , j , pass; int flag=1 ; for(pass=1;pass<n-1 && flag==1;pass){ flag=0; for(j=0;j<n-pass-1;j++){ if(x[j]>x[j+1]){ flag =1; temp=x[j]; x[j]=x[j+1]; x[j+1]=temp; } } } } // Env\d …

Member Avatar for HASHMI007
0
133
Member Avatar for Smartflight

The aim is simple: Input a string from the user, input a word that is to be searched in the string, and return "Found" or "Not found" I have worked down the following code, and it works. [CODE]#include <iostream.h> #include <stdio.h> #include <string.h> void main () { char para[200], word[20]; …

Member Avatar for Smartflight
0
15K

The End.