49,761 Topics
| |
given the following code [CODE]bool space(char c) { return isspace(c); } bool not_space(char c) { return !space(c); } template <class Out> void split(const string& str, Out os){ typedef string::const_iterator iter; iter i = str.begin(); while(i != str.end()){ i = find_if(i, str.end(), not_space); iter j = find_if(i, str.end(), space); if(i != … | |
Hi, I'm having trouble figuring how to search for a specific element of a class in a list. I saw some examples of find() but they only show how to search for a string or an int. Another thing is modifying elements of a class. So let's say I have … | |
Hey guys, The question on the homework is "Write a function that returns a count of the nodes that contain a value less than the parameter value." I was wondering if someone could point me in the right direction maybe with some pseudo code or something of the like. ive … | |
Hi I have a GUI created using VC++. I want to read the value or content from a text box of another GUI in windows(dont have sourec for this GUI). Can you pleae suggest me how can i do this, please also point me to some basic tutorial or books … | |
Hi can anybody provide me with the code for c++ programme for the famous game who wants to be a millionaire. Thanks | |
Hai all, i want to create interactive multimedia software. the software want to run in windows, linux, and mac. what the programming language that suite to developed that software?. c++ or adobe air? Best Regards | |
Hey everyone, In my COMP 208 class, I was asked to do the following: "Redo Lab 2 Problem 2, only this time use vectors to hold the names and gpa’s instead of arrays. So you will work with 2 vectors, one holding the gpa’s (type double) and the other holding … | |
I am trying to learn C++ through on-line tutorials and such. In almost all tutorials, the author tells you which headers to include for that particular exercise, but never tells you how he knows that. I understand that if you are advanced enough to be writing tutorials, you know off … | |
Hey I'm having trouble with compiling this code, I keep getting a "undefined refernce to winmain@16 I feel like it has to do with int main() I tried just main(), im not sure how to fix that [CODE]#include <iostream> #include <fstream> #include <string> #include <stdio.h> #include "HangmanBoard.h" #include "FileProcessor.h" using … | |
do u know some code that we can use mouse in c++ because i want to click some button in my assignment ? | |
Hi, When I access the property pages of a project with Visual C++ 2010, in the 'Configuration Properties | VC++ Directories' sub-tab there's an 'Include Directories' property. Under 'Configuration Properties | C/C++ | General' there's a property 'Additional Include Directories'. Is there a difference between the 2? What are the … | |
i have some question to ask everyone . 1.what is thread ? 2.what is advantage to use thread ? 3.if you can ,please give me some tutorial about create and using thread . 4.thank for your answer | |
Hello, I am working on developing an interpreted programming language for a capstone project and have hit a snag dealing with two classes. In the interpreter, the classes represent a scope containing a procedure pointer and the procedure pointing back to the scope containing it. The former to allow the … | |
Hi everyone, I am taking a C++ 100 level beginners course and we just got this assgnment that I am stuck on. Here is the assginment description: [QUOTE]We are going to just compute the first 15 or so digits of π using doubles. In any case, to compute the value … | |
ok so here the problem the code works just adds break on to every line i want it to only add breaks to the line that don't alraedy have spaces after them. while (! fileIn.eof() ) { getline (fileIn, linea); fileOut << linea << b <<endl; }//end while is what … | |
can anyone help me to clear this ? example: Hello i want to clear 'e' and remain words is "Hllo" please tell me if it possible . thank for the answers. | |
Hey all, I've used this site quite a bit as a reference, and couldn't find a solution that worked for me. So I became a member. :) Anyway, I can't get my insert function to...function when I go to add a node. The node is NOT to be just added … | |
Hi folks i only have one question.Can or should i delete a base class object instantiated in a derived class's constructor , inside the derived class's destructor? [code] class A { protected: int somedata; public: A () {} A (int x) : somedata(x) {} virtual ~A () {} }; class … | |
I don't know what i'm missing, but I keep getting the error in the poly_tst file when trying to compile that says 'expected primary-expression before ']' token. According to my book I'm writing everything correctly. Here is my class file function (poly.h) void setcoeff(Term); Here is my implementation file definition … | |
Hi, i am porting my applicaiton from vs6.0 to vs2005 i am getting problem enum ,it is not getting integral value Could somebody help in fixing this issue, thanks in advance [code]enum Keys { classesRoot = HKEY_CLASSES_ROOT, currentUser = HKEY_CURRENT_USER, localMachine = HKEY_LOCAL_MACHINE, currentConfig = HKEY_CURRENT_CONFIG, users = HKEY_USERS, performanceData … | |
ok so im trying to implement a stack using vector and i have to access the last element of the vector el, i dont know if its right and also how would i implement the pop function of the stack using vector el_t stack::topElem() { el_t n; if(isEmpty()) cout <<"stack … | |
i have a string which is giving me problems. when i put it into a textfile, it puts the cursor onto the nextline. i assume because there is a \n at the end of the string, but when i cout the string, the newline character isnt there (well, the console … | |
I need to take my last C++ class over one more time and just trying to get a head start on the programs we had been assigned. I will provide the instructions and was wanting to get any feedback on what I should get rid of my current program and … | |
I'm writing a polynomial project that requires me to utilize classes. Problem is, I have the polynomial stored in two arrays in the class, one for coefficients (float coefficientholder[10]) and one for exponents (int exponentholder[10]), and get functions (at least according to my book) are simply consisting of return commands … | |
I have another question regarding activating of an automatic door: three sensors front pad, rear pad, and door; they determine weather the door is activated or not. front pad=0 empty front pad=1 occupied rear pad=0 empty rear pad=1 occupied door=0 closed door=1 open there are situations when the door is … | |
Hey, I'm having some troubles reloading a new png in place of my old one on my window using the GDI+ SDK. Here is my WM_PAINT message: [CODE]case WM_PAINT: { BITMAP bm; PAINTSTRUCT ps; //Painting the Background HDC hdc = BeginPaint(hwnd, &ps); HDC hdcMem = CreateCompatibleDC(hdc); HBITMAP hbmOld = (HBITMAP)SelectObject … | |
Hi...I wrote a proggy that replace some words in text file there is a condition that if somebody write in the texbox ","...all sentences change into plural form... [CODE]if (systemTEXT->Text->Contains(",")) {token == 1;}[/CODE] it works great...text contains "," - it means plural forms are needed..token=1 [CODE] if (linia->Contains("system_token")) {poprawka = … | |
This is the line of code that I am getting an error with. [CODE]mtx[cIndex(bitNum)] & = ~(1 << bIndex(bitNum));[/CODE] The error code is: expected primary-expression before â=â token I think I am missing some '(' and ')''s. Thanks! | |
So i've been working on this for while and i keep getting error after error, after i posted here last i cleaned it up but here is my latest debug error. I feel like that my code and algorithms are all there but im messing up in one of my … | |
Okay, so I'm a 7 month experienced programmer in C++, and now is the time when I am having the most trouble. So my Professor wants us to create a program that asks the user to input a sequence of numbers and then convert those numbers into outputs of "how … |
The End.