49,756 Topics

Member Avatar for
Member Avatar for NinjaLink

Hi, I am new to stacks and need some help getting started with my first program in stacks. I have all the functions like pop,push etc. in my header file. I have to create a palindrome program with the objectives below. If someone can give me an idea on how …

Member Avatar for DemonGal711
0
163
Member Avatar for iris88

How to prompt user enter 10 integer then sort it in both ascending and descending order and also ask user either they want to sort it by insertion sort or selection sort or bubble sort??

Member Avatar for Tom Gunn
0
121
Member Avatar for eliza2044

Hey guys, Can anyone post sample code about updating an object that is already in an std::list? I know that it sounds as a really stupid question, but obviously I'm doing something wrong. In my code I'm going through the list with an iterator until I reach the object of …

Member Avatar for eliza2044
0
6K
Member Avatar for Qmage

This is just part of my code. For some unknown reason, the value of staff is correct after using copy constructor, however, once it goes out of the loop, 2 of s value's turn into -858993460, other values stay fine, look at the red lines part of the code [CODE] …

Member Avatar for Qmage
0
397
Member Avatar for anbuninja

so im trying to practice writing a few programs that might have to do with my upcoming test soon. in this program i wanted the user to enter a test score and it couts the letter grade. doesnt work properly it couts the test score instead of the letter grade. …

Member Avatar for dgr231
0
162
Member Avatar for NinjaLink

I started a new thread since my last thread was getting to long. I am using stacks to find out if a string of characters is a palindrome, is not a palindrome, and is almost a palindrome. However, my output comes up and then disappears when i compile. So far, …

Member Avatar for VernonDozier
0
139
Member Avatar for kingbarry90

#include<iostream.h> using namespace std; char*ones(int number){ int num = number&&100; if(num>10&&num<20){ return ""; } else { num = num%10; switch (num){ case 1: return "one"; case 2: return "two"; case 3: return "three"; case 4: return "four"; case 5: return "five"; case 6: return "six"; case 7: return "seven"; case …

Member Avatar for Unix*
-1
97
Member Avatar for rechene
Member Avatar for Unix*
-4
104
Member Avatar for NICEGUY123

I need some help with a problem. I am attempting to insert numbers into a binary tree, then converted it to a rbtree, just curious on how i can change it over i know that 10 (black), 4(red), 5(black), 6(red), 11(red), 12(black), 13(red) as my input. int a[] ={10, 4, …

Member Avatar for Tom Gunn
0
94
Member Avatar for platinn

Hello , I have just started dealing with OpenCV and tried to open an sample.I am using version b4a. And when i opened a sample source file(for example:face detect). I compile source file(face detect) and it(visual stdio 6.0) gives 0 error or warning. But when i tried to run it …

Member Avatar for Muaz AL-Jarhi
0
288
Member Avatar for merse

I have the following integral function with Simpson's rule: [CODE] typedef double real; typedef real real_func(real); real Integral(real_func func, real a, real b, unsigned int N = 1000) {...} [/CODE] It works like: [CODE] real myfunc(real x) { ... } Integral(sin,1,2); Integral(myfunc,1,2); [/CODE] But does not work with a public …

Member Avatar for Tom Gunn
0
144
Member Avatar for ankur_

I am not able to find a good MFC Tutorial. Do anyone has got a link for a MFC Tutorial which consists from basic to advance.

Member Avatar for Ancient Dragon
0
171
Member Avatar for breckj

Hi, I would like to learn C++ and become a gaming programmer. Your suggestions to the following are appreciated. Q1) What development software do you suggest (compiler, code editor, ide, etc)? Free versions as well as priced, thanks. Q2) Regarding OS, does anyone recommend Linux over Windows (XP, Vista, 7)? …

Member Avatar for Ancient Dragon
0
93
Member Avatar for sha9n

can anyone answer this question? You are to write a C++ language program that: 1. Reads in the size of a square from the screen; 2. Prints a hollow square of that size out of “-“, “|” and blanks on screen; 3. Prints the same hollow square onto a text …

Member Avatar for Ancient Dragon
-1
81
Member Avatar for rechene
Member Avatar for Phil++

Hey, I have to create class diagrams for each of class that I have created. I have currently create 4.. Please could you have a look at the example class diagram and tell me if it looks alright or have I done it completely wrong? Thanks for any help.

Member Avatar for Phil++
-1
82
Member Avatar for Web_Sailor

Hi. :-/ I am trying to create multiple output files while reading a single input file. The multiple files will be created based on the value in the first field. My set1 contains 1,2,3,2,1,3. That is Field1 values. My multimap contains the other fields (field2 and field3). Now what I …

0
71
Member Avatar for merse

I have a function which acts on class member function: [CODE] template <typename ClassType> double Integral(ClassType& obj, double (ClassType::*func)(double), double lower_limit, double upper_limit) {...} [/CODE] This can be call like this from outsie: [CODE] class myclass{ public: double classfunction(double); }; double myclass::classfunction(double x) {...} int main() { myclass probe; std::cout …

Member Avatar for merse
0
161
Member Avatar for racumin

Hi, from my understanding, if you initialize an object without the "new", it will be only saved in the stack. If the method exits, the object is destroyed. Is that correct? What about this code? [CODE] int main() { string xxx = getText(); cout << "from main() " << xxx …

Member Avatar for mrnutty
0
129
Member Avatar for chiraag

Hi all, I am a beginner to coding. Forgive me if my question is too silly. What I would like to know is can dynamic allocation in a loop result in shortage of memory. what I am trying to do is find FFT of a large no of images in …

Member Avatar for chiraag
0
231
Member Avatar for FBIRyan

The idea is to have many MessageBox() calls, each within their own thread. The catch is, each thread has to be dynamically created. At first, being a noob, I tried this: [CODE]void Go[10](void) { MessageBox(NULL, _T("..."), _T("..."), MB_OK); } .......... CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Go[i], NULL, NULL, NULL); [/CODE] That, obviously, didn't …

Member Avatar for FBIRyan
0
116
Member Avatar for ViP3l2

Hi, I'm fairly new to C++. My project states that I must write a program that will allow the user to view a list of TV shows read from an input file. each show should consist of four data members: show ID, Title, day of show, and time(pm). ID serves …

Member Avatar for DemonGal711
0
179
Member Avatar for Renas

hi everyone i'm new in programing, so don't judge me if i will say something stupid... i'm trying to write i poker game in C++ but have faced with several problems, the first one is how to determine a winner... for example i player hand is: Ace of spades card …

Member Avatar for Clinton Portis
0
182
Member Avatar for Phil++

Hey, I'm currently learning about classes and I am wondering how to implement a sub-class into a class. I have a class atm called "Person" but I want to create a sub-class called administrators. So would it be: [code] Class person { public: // class methods // class methods private: …

Member Avatar for dkalita
0
147
Member Avatar for saarah
Member Avatar for ASFtlink

Hello, I need some help on processing only even numbers on a counter-controlled do-while-loop, an event-controlled do-while-loop, and event-controlled do-while-loop to process only even numbers that breaks within the loop. I'm new at C++ so help would be appreciated. Thanks. [CODE] #include <iostream> #include <fstream> #include <string> #include <cstring> #include …

Member Avatar for DemonGal711
0
199
Member Avatar for program900

I need to make a function called “menu” that displays a main menu. This function should return the choice of the user please help!!!

Member Avatar for DemonGal711
-4
94
Member Avatar for Towely

I'm attempting to create a computer program that prints a triangle of digits, as well as a "ruler" that measures the user specified width of the screen, showing the width in digits. The ruler must have a tens row and a ones row. The program reads three integers: a) the …

Member Avatar for Towely
0
242
Member Avatar for tiara

Hello guys.. I am really new to OOP (object-oriented programming) with C++. I am trying to make a simulation window program. I have a bit confused about apply linked-list inside the class. I mean, I am trying use linked-list to do adding item menu. Yes, I make the lists of …

Member Avatar for tiara
0
70
Member Avatar for dylank

Hi, I was hoping someone could help me with a C++ string problem. I currently have my program open up a file, read the contents into a string, and then I am trying to look for certain key characters in the string, like < and </. In short, I am …

Member Avatar for Clinton Portis
0
353

The End.