49,755 Topics

Member Avatar for
Member Avatar for burhanms

Hello, I work on a problem and I want my solution to be picked from discrete numbers.( I want a value for diameter and I want it to be selected from the available diameter values) Does anyone know it can be done with C++ and how? Thanks

Member Avatar for MosaicFuneral
0
94
Member Avatar for NinjaLink

Hello. I am currently having problems. I am asking a user to input the position and number of where they would like to insert into the Linked List. After the user input the information, the number does not appear in the Linked List, but everything else does. Can someone help …

Member Avatar for paramdhingra
0
122
Member Avatar for risa

Hi, How to insert a combox to a column of list ctrl in MFC?....such tht i can select a particular item from a list of items in the combo box of list ctrl column....plz help

Member Avatar for Nick Evan
0
91
Member Avatar for NinjaLink

Hello. I'm having problems in 2 different functions: GetNth() and InsertNth() 1) For my GetNth() function, I want to take my linked list and an integer index and return the data value stored in the node at that index position. For example: {42,13,66}, the index of 1 should print out …

Member Avatar for NinjaLink
0
204
Member Avatar for madmaxx350

How do you exit a sentinel controlled loop forcefully ? [code]while (finalstar != word && ct1 < 7) { let_pos = word.find(letter); if (let_pos != string::npos) { get_letter = word.substr(let_pos,1); new_letter = finalstar.substr(let_pos,1);// gets star from string made of stars new_letter = finalstar.replace(let_pos,1,letter); cout << "Right !!" <<endl; ct1 = …

Member Avatar for MosaicFuneral
0
97
Member Avatar for meddlepal

I am trying to solve a tricky problem involving a sorted array. Say I have an array of sorted integers (8, 6, 4, 1) and given the value x I need to check the array to see if any two numbers add up to x. This needs to be done …

Member Avatar for meddlepal
0
135
Member Avatar for kotkata

[code]void decryption() //this function decrypts whatever the user inputs using keys 1 - 100, providing all possible decryptions { const int MAX = 100; string code, output; char array[100]; cout << "Enter what you would like decrypted" << endl; cin >> code; //herein lies the problem strcpy(array, code.c_str()); for (int …

Member Avatar for kotkata
0
92
Member Avatar for jimbob90

im writing a simple program that turns a decimal to hex. im only posting the piece of code where i have the problems [code] string hexnumeral (int d) { int h,l; string e,y,f; if (d < 16) return hexdigit (d); else { f = d / 16; h = d …

Member Avatar for Ancient Dragon
0
98
Member Avatar for Niner710

Hi, I am writing output to a file and am using ostream. I wanted to format my output and not sure how to do it. Here is some simple code. [code] int var1; int var2; ofstream out("blah.txt"); out << "Name " << var1 << endl; out << "NameofAnotherPerson << var2 …

Member Avatar for Ancient Dragon
0
112
Member Avatar for dankbc1

Hey guys, I'm having a problem with my checkers program; whenever I move the piece, it redraws the whole board and basically puts the piece back into its original position. The code is attached to this post. Thank you for your help!

Member Avatar for dankbc1
0
84
Member Avatar for Lukezzz

Is there a way to Alt-F4 programatically. It will be used to close another programs window that opens wich is the topmost form on the desktop.

Member Avatar for Lukezzz
0
186
Member Avatar for j_p36

Ok, so I've been working on this code for a day now and i thought I had all the kinks worked out, but my program isn't working right. I'm writing this code to simulate a game (basically a simulation of a simulation) used to illustrate some topics we are trying …

Member Avatar for j_p36
0
180
Member Avatar for Tausif214

please help me with this Assignment: Write a program that will read the critical path information from the attached file (ProjectInfo.txt) into 3 arrays, events, tasks and numDays and defines a 4th array called eventNumDays in which you will calculate the number of days needed for each event to complete, …

Member Avatar for Tausif214
0
95
Member Avatar for MJFiggs

I am a bit confused. I am trying to make a program that will take the choices you make and display them all simular to this: Item 1. Sword Item 2. Shield Item 3. Potion Item 4. Potion but when I try to run it it looks more like this …

Member Avatar for MJFiggs
0
135
Member Avatar for GDICommander

Hi, everyone. I am doing a performance test on the heapsort. I wrote this program and it has a run-time error that I cannot explain. I am compiling on Microsoft Visual Studio 2008 and this is the error. HEAP CORRUPTION DETECTED after Normal Block ... well, I think that the …

Member Avatar for GDICommander
0
113
Member Avatar for Foe89

I'm really not understanding what's going on with the array in this. Here's the question. The following code totals the values in each of the two arrays. Will the code print the correct total for both arrays? [code] int total = 0; int count; for (count = 0; count <= …

Member Avatar for ddanbe
0
113
Member Avatar for hello11

Here is my code I'm pretty sure the problem has to do with using namespace std and the included header files but I can't figure it out (error string no such file or directory in .h, error iostream no such file or directory in .h,error syntax error before namespace) box.h: …

Member Avatar for Ancient Dragon
0
104
Member Avatar for Lokolo

Main.cpp This is where the problem lies. [code] #include <iostream> #include <time.h> #include <math.h> #include <iomanip> #include "LinkedList.h" #include <fstream> #include <string> using namespace std; void main(void) { LinkedList Customers; Customer* newCustomer; Entry* test; int i = 0; newCustomer = new Customer(1001, "Olly", "07/10/1988", "17 Bob Lane", "Hobbs Road", "UB3 …

Member Avatar for Lokolo
0
113
Member Avatar for nedsnurb

Hi Have written this code for a program that requires the user to either enter 1 or 2 dependant on whether the program solves the problem of finding the divisors of any given to numbers by recursive or iteration methods. [code] #include<iostream> using namespace std; int recursiveGCD(int ,int ); int …

Member Avatar for nedsnurb
0
130
Member Avatar for scamguru

Please help me. I have to read CVS Tag of a file or directory from C++ program in LINUX. Any small idea is also welcome. Thanks in advance.

0
43
Member Avatar for Cwapface

Okay, I cannot figure this out. I still get the same error: [QUOTE]Error 1 error C2039: 'function' : is not a member of 'D'[/QUOTE] Here's what I have: Class A.h: [CODE] #pragma once #include <string> using namespace std; class D; class A { public: void function(string s); friend class D; …

Member Avatar for mrboolf
0
102
Member Avatar for kavithabhaskar

Hi: I need some assistance in this code. I am trying to get this format. 1 .2 ..3 ...4 and so on.. i dont get any errors in the code but i get no o/p eitehr [code] #include<iostream.h> int main() { int i; cout.fill('.'); for(i=i;i<10;++i) { cout.width(i); cout.fill('.'); cout<<i; }}[/code]

Member Avatar for chococrack
0
144
Member Avatar for nnhamane

Can anyone tell me what is the main purpose of Dll? As we can get the data from Dll, can we put the data in Dll? I am not talking about code, talking about single Dll. If you know about Dll then please share your knowledge..

Member Avatar for kux
0
110
Member Avatar for kux

I have a document/view aplication that opens a bitmap I use the following OnDraw override to draw the bitmap on a window and OnOpenDocument to opening the image from file The bitmap handle ( HBITMAP bmaphandle ) is taken from the Document object that does LoadImage in it's OnOpenDocument method …

Member Avatar for kux
0
167
Member Avatar for mpCode

I am working on a small project that contains a vector of base class pointers and my question is, is there anyway to tell which derived class is being stored in the container. for example... we have a base class named creature and two derived classes named, alien and monster. …

Member Avatar for mrboolf
0
151
Member Avatar for zinashamaa
0
74
Member Avatar for k59smooth

I'm trying to input these letters into and array using the following an tex char Letters[26] = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}; my complier has an error reading too …

Member Avatar for Nick Evan
0
80
Member Avatar for k59smooth

I'm trying to input these letters into and array using the following an tex [TEX]char Letters[26] ={"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}; [/TEX] my complier has an error reading too …

Member Avatar for Nick Evan
0
284
Member Avatar for DJPlayer

I'm getting ready for a test in a couple days. I'm trying to find some decent well commented examples of programs that use polymorphism and inheritance (public,private,protected). Also it was mentioned about special circumstances on using const for a variable within the say private area of a class. Any assistance …

Member Avatar for Nick Evan
0
87
Member Avatar for Stefano Mtangoo

Hello all, greetings I wonder where I can get API for afore mentioned DLL files? I need to use them in small app for personal exercises and needs API docs Also would like to know if there is anyone acquainted with Ctypes? Thanks all

0
60

The End.