49,757 Topics

Member Avatar for
Member Avatar for beginner at c++

Write a complete, well-written, documented program (named convert) that prompts for and reads in a number with at most MAX_DIGITS (9) in one of the following four formats: binary, octal, decimal, and hexadecimal and converts it to a requested base. Once the number has been read in, you should verify …

Member Avatar for Labdabeta
0
267
Member Avatar for Labdabeta

Hello. I was reading http://xkcd.com/287/ while bored and thus decided to write a program that would solve such np complete problems. Here is what I got: #include <iostream> #include <vector> using namespace std; template <typename T> T NPMenuProblem(T desired, vector<T> options, vector<T> &ret) { vector<T> save=ret; T remainder; T min=desired; …

Member Avatar for Labdabeta
1
208
Member Avatar for yankeetooter7

I am working on a password project for school, and I am stumped on one part. I know how to test if a string (or file) contains a digit, or a letter, but in this case we have to verify that there is at least one character that is not …

Member Avatar for yankeetooter7
0
208
Member Avatar for TexasJr

I thought I was finished with my code until I tried to compile it and came out with an error that I really don't know where it's coming from. Can anyone look over and see if they can find the source of the error? Please and thank you! These are …

Member Avatar for TexasJr
0
2K
Member Avatar for kshahnazari

I was writing a data structure but suddenly after a little coding a strange error gives that no operator">>" matches these operends and also no operator"=" matches these operends . its just after if (right==1) in the cin>>a[i] and a[i]= mininfinitive the code : #include <iostream> #include <iomanip> #include <fstream> …

Member Avatar for Moschops
0
257
Member Avatar for otengkwaku

Wrote a peice of code that does something uniquc in my point of view. After that i was so excited that i published it. Only to find out that it contain a bug. By the way the bug was very defficul to spot. and by solving the bug i reworte …

Member Avatar for snippsat
0
294
Member Avatar for Wireboy

I'm new here and just started my first class program. It's an input/output assignment and I'm using getline to store the string values since I anticipate whitespace being used. The problem is that in the console, the code doesn't allow me to input anything for my favorite city, leaving it …

Member Avatar for nullptr
0
148
Member Avatar for Jack Mao

![0003e99559e2db89a7730de5f5845696](/attachments/small/4/0003e99559e2db89a7730de5f5845696.JPG "align-left")

Member Avatar for NathanOliver
0
53
Member Avatar for amjadalibooni

Σ = {a, b} Write a Regular Expression, that only accepts strings with exactly two or three a’s in the string. There is no restriction on occurrence of b’s in the string. Few examples of accepted strings are as under; - bbaabbbba - baba - aba - abaa - aa …

Member Avatar for Moschops
0
84
Member Avatar for new_developer

Hi there, I need help in making class diagram. What are the attributes of staff of University its behaviours(functions) of staff ?? The attributes which i figured out are name, id, salary, dateOfJoining, qualification. But I can't figure out functions. Anyone please help.

Member Avatar for tinstaafl
0
131
Member Avatar for Labdabeta

Hello, I am making a program that deals with bitmap files and I want to try to load bitmap data manually. The issue is that I cannot find a good resource for exactly what bitmap files can contain. [Wikipedia](http://en.wikipedia.org/wiki/BMP_file_format) has a decent article, but it is missing some important information. …

Member Avatar for Labdabeta
0
666
Member Avatar for taimor

![bf4dc2600477f6087a38bb2ec34ccd7f](/attachments/large/4/bf4dc2600477f6087a38bb2ec34ccd7f.jpg "bf4dc2600477f6087a38bb2ec34ccd7f") what is the wrong?...this massage came when i decleration a pointer in my program and use it !!

Member Avatar for taimor
0
161
Member Avatar for zahidpp

Please Help me This Question On computers using the Intel 80n86 series of processors there are two different ways of storing an address. These may be called near and far . A near address requires 16 bits of storage whereas a far address requires 32 bits of storage. An actual …

Member Avatar for Ancient Dragon
0
317
Member Avatar for nifhail

I REALLY NEED HELP WITH THIS QUSTION AND I ONLY HAVE 48 HOURS TO COMPLETE IT.. I DONT EXPECT ANY OF YOU TO DO IT FOR ME.. BUT I REALLY NEED SOMEONE WHO WOULD TEACH ME.. EMAIL : nifhail_torres@yahoo.co.uk As everyone knows that Malaysia is going to have the 13th …

Member Avatar for NathanOliver
0
712
Member Avatar for salesman91

` #include<iostream.h> #include<conio.h> void main() int n; int f,c; cout<<"1:enter the faranheit value to convert:"; cin>>f; cout<<"2:enter the celscious value to convert:"; cin>>c; clrscr(); switch(n) { case 1: ftoc(c); break; case 2: ctof(f); break; default: cout<<"try 1 or 2"; } getch(); } float ctof(float d) { d=d*9/5+32; cout<<"faranheit value is:"<<d; …

Member Avatar for salesman91
0
271
Member Avatar for Martje

My code was working Great! until i added a vector named "resudibus"to my namespace in a windows form. #pragma once #include <Windows.h> #include <msclr\marshal.h> #include <iostream> #include <string.h> #include <vector> #include <fstream> using namespace std; using namespace System; using namespace System::IO; using namespace msclr::interop; namespace Project1 { using namespace System; …

Member Avatar for vinci.ffs
0
2K
Member Avatar for cobaltfive

I am in dire need of help. I need this array to list the months as the user enters rainfall totals. then I need it to calculate the highest , lowest , average and total rainfall months. I can get it to do it without the months but not with …

Member Avatar for Ancient Dragon
0
956
Member Avatar for TarkiB

Hi all! I'm trying to create a program that produces a memory leak. I have a program that looks like it works, but I was wanting to verify whether it actually is causing a memory leak, and that it's not just some other type of issue. It's in C++, which …

Member Avatar for mike_2000_17
0
377
Member Avatar for The Matrix
Member Avatar for Ancient Dragon
0
215
Member Avatar for Suzie999

Does anyone know how to restore a window (which does not belong to current process) to the state is was in previous to having been minimized? I've been trying ShowWindow and SetForegroundWindow, but if the window was maximized, it will only restore it to it's RESTORE state (not maximized) ShowWindowAsync(hWnd, …

Member Avatar for Ancient Dragon
0
585
Member Avatar for hajkmusic

Hello people! I am a beginner trying to teach myself C++. If you guys could help or suggest me something I would greatly appreciate it! Sorry for my English! My program determines if the entered number is prime or perfect. I have a few problems with it. I would really …

Member Avatar for JasonHippy
0
243
Member Avatar for DJ69.ns

Create a class Hangman with the following private attributes:  Words: should be a static array of character pointers with 5 elements.  Word Name: should be a pointer to a character.  Chosen Letters: should be a pointer to a Boolean.  Letter: should be a character attribute.  …

Member Avatar for Ancient Dragon
0
146
Member Avatar for RonalBertogi

Observe this code: TOOLBARINFO tbi = { 0 }; BUTTONINFO bi, *xBI; tbi.pTOI = pTOI; int x = 0, xSearchBox = 0, s = 0; BYTE xType = btNone; BOOL bAdd; for( ;*pszInfo; ) { bAdd = TRUE; memset(&bi, 0, sizeof bi); switch( *pszInfo ) { case bfButton: s++; bi.L …

Member Avatar for RonalBertogi
0
195
Member Avatar for nova37

i want to know that how can we keep an eye on one process that its alive or terminated , actually i have service which will always check my process if my process terminated then service will start it again so i want to know how to check process status …

Member Avatar for nova37
0
866
Member Avatar for little_engine

I have a problem that I have not been able to figure out with this assignment. The idea is to write a grading program that will calculate the letter grade, and average while also giving exam scores for 5 students, each student has 4 exams. I have built it up …

Member Avatar for little_engine
0
360
Member Avatar for daniel1977

The problem I am having is that it will not allow me to define a class without building a default constructor outside of the class. For instance if you comment out line 19 on the header file you will recieve an external linker error. The same will happen if you …

Member Avatar for daniel1977
0
352
Member Avatar for Suzie999

(edit) this is solved, was a unicode issue. Hi I'm hoping someone has used the library [pugixml](http://pugixml.org/) I'm just trying to use a simple example provided but I'm not getting the result I expect. int _tmain(int argc, _TCHAR* argv[]) { pugi::xml_document doc; pugi::xml_parse_result result = doc.load_file("tree.xml"); //pugi::char_t * c = …

0
154
Member Avatar for adison.afonso

I have this Singleton class called ZombieLand that is supposed to represent a 2D array. This 2D array is getting constantly updated and populated by different instances of my MachineState struct, which contain x and y coordinates to help me navigate through the 2D array. #pragma once #include "singleton.h" #include …

Member Avatar for Moschops
0
235
Member Avatar for evilguyme

Hey guys, I ran into a small problem, I need to make a software that does some basic calculation and saving to a custom file. To make this software i don't know how to start, do i need to make an MFC Application? and if i do then what settings …

Member Avatar for evilguyme
0
366
Member Avatar for daniel1977

Dear Friends: I am struggling to overload the operators on this exercise. It was working fine when I just had the addition operator overloaded for the extRomanType but now I can't get them to work again. I have searched through the internet and I cannot figure out what I am …

Member Avatar for daniel1977
0
291

The End.