49,757 Topics
| |
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 … | |
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; … | |
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 … | |
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 … | |
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> … | |
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 … | |
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 … | |
![0003e99559e2db89a7730de5f5845696](/attachments/small/4/0003e99559e2db89a7730de5f5845696.JPG "align-left") | |
Σ = {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 … | |
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. | |
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. … | |
| ![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 !! |
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 … | |
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 … | |
` #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; … | |
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; … | |
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 … | |
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 … | |
Hi guys, I would like to know How to blink console text using Dev C++. | |
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, … | |
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 … | |
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. … | |
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 … | |
| 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 … |
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 … | |
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 … | |
(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 = … | |
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 … | |
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 … | |
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 … |
The End.