49,757 Topics
| |
Hello i'm a 1st year CompScience student , i have this project that need me to do a similar things to a game called Triple Town . I'm about 50% done and my problem is the matching part. It is similar to triple town games i'm sure you heard of … | |
If a function present in Base class is overridden in derived class then Inheritance has ambiguity .So virtual keyword is used to overcome this and at run time which function to call can be decided by using Base class pointer to point to either Base class object or Derived class … | |
Hello friends, for the last couple of days i am having problems with STL programming. I have 2 compilers Borland and Eclipse (both latest versions) and i cant program with STL in either of these. I write simplest of programs of STL(vector and list), the program gets compiled with no … | |
Hi i am going to make a Binary Utility but I don't knnow how to program using extern uint16_t Bcdbin(const uint8_t* const pBcdBin) I have already read about extern and about unsigned int but I don't understand how to make a function for that code. please help. ty | |
| **How to go back to** start_new_input: **of main() function?** #include <iostream> #include <string> #include <cmath> using namespace std; //global varibals: char entered_characters[9999]; int direction_of_rotor1; int direction_of_rotor2; char alphabet_of_rotor1[26]; char alphabet_of_rotor2[26]; char rotor1_backward(char Letter); char rotor1_forward(char Letter); char rotor2_backward(char Letter2); char rotor2_forward(char Letter2); char print(char print_char); int main() { cout << … |
I was asked to write code for consumer and producer threads accessing shared queue in an interview with the given primitives ADDNEW.Process PROCESS.SET PROCESS.RESET ENTER CS EXIT CS LOOP EXIT LOOP WAIT# PROCESS | |
Newton's Method to find polynomial solution Hi everyone, this is my first post and I am new to C++. I am trying to figure out how to do this project. Newton’s method is an algorithm that can be used to solve an equation of the form f(x) = 0 using … | |
void CRobotDlg::OnBnClickedSnip() { //---------- navigate to Snip CString sUrlSnip= L"http://Snip"; m_ctlBrowser.Navigate(sUrlSnip, 0,0,0,0); while (m_ctlBrowser.get_ReadyState() != READYSTATE_COMPLETE) { DelayMs( 100 ); } //------ page is ready to process IHTMLDocument2* pDoc= (IHTMLDocument2*)m_ctlBrowser.get_Document(); IHTMLElement* pElemBody= NULL; pDoc->get_body(&pElemBody); CComBSTR bstrHTML; pElemBody->get_innerHTML(&bstrHTML); CString sBody= bstrHTML; // easier to work with as a CString //MessageBox(sBody); // … | |
Hi new member here! i'm having a problem with my code here but I really don't know why, its in the line where i'll comment.. #include<iostream> using namespace std; void convert(char*); void main(){ char r, sen[200]; do{ cout<<"Enter text: "; cin.getline(sen, 200); convert(sen); cout<<"Try again?[Y/N] "; cin>>r; cin.ignore(); }while(r=='y' || … | |
I'm working on a program driven by a menu. At the end of each menu component, the user will have the option of running that component again. If they enter an invalid entry (not a y or n) I want to go back to the main menu. I shortened my … | |
Just a short question Can you help me please? thank you so much :) **What is printed by the following C++ code? cout << "'\\\"'";** | |
I was thinking about making a TSR program in C++. I did some googling but found that most of them are using "dos.h" headers. This is obsolete and its use is frowned upon. So how can I make a simple TSR program in C++ ? | |
| When it gets to cout << "Chose direction of rotor 1:" << endl; cout << "*(i.e.:enter 1 for left and 2 for right)" << endl; and i enter 1 or 2 it couts "Wrong choice" #include <iostream> #include <string> #include <cmath> using namespace std; //global varibals: char alphabet_of_rotor1[26]; char alphabet_of_rotor2[26]; … |
if (__comp(__a, __b)) this is the error referred to the file above. basically, it's just about this question : 5-6. Rewrite the extract_fails function from §5.1.1/77 so that instead of erasing each failing student from the input vector v, it copies the records for the passing students to the beginning … | |
hi everyone, I wonder which is better :to start learning a new programming language or develop my skills in the C++ language ? As I started learning C++ since 7 months :) thanks ina advance for all :) | |
Can you please help me with this question. I do not understand. :( thank you so much. **If a, b, and c are integer variables, some of these expressions are valid C++ and others are not. For each expression, add parentheses to indicate the precedence and associative rules, and hence … | |
How can I reverse a GLTranslate. Example: if glTranslate is called before rendering text to the screen, how can I figure out the position of that text if glTranslate weren't used? The text is rendered to the screen like this: glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB, 7681) glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB, 34168) glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB, 768) glColor4ub(0, … | |
Given a 7x4 array generate four random numbers from the array with no repetition. I can already generate four random numbers the problem is the repetition part. Here's my code so far int f[4]; int s[4]; for( i = 0; i < 4; i++) { // use as index for … | |
How does one write code to make drawings in the Windows main client area of a Win32 C++ app? I found an example online that uses the "eclipse" API but when I put it in my program, the IDE complained so it would not compile. | |
I am trying problem 16 from project euler, i want to add a00 integers 50 decimal places each.So i searched and found BigIntegerLibrary, but can't find any good reference material on what are the varoius functions and operators in the library. Please provide me some decent material on how to … | |
Hey guys, im new to C++. been learning for only about a week. The most complex program i can make is a calculator! But, i was wondering, how hard would it be to make a text-based zork-like game? Like i said before im new, so any tips and/or tricks to … | |
To be honest, my programming skills stink. The College textbook I have been using dosen't do it for me. And I learn better by looking at examples. However, I have not been able to find a website that offers an extensive archive of C++ code examples. From the basics such … | |
Hi I am sort of having a little trouble with a part of my program. First off let me tell you a couple of the variables. Let m be the number of rows and let n be the number of columns in a 2D array. Let i be the counter … | |
How can I manipulate images in C++? Is there any built in function? I googled and found that only bitmap images can be used, but why not jpeg and png and others ? | |
my friend and I want to make and program our own computer hardware, such as a very simple robot ( a thing with wheels that can avoid objects and stuff like that). I have expiraince with C++ and i have heard that it is posible to program such things using … | |
Hello, wondering if someone can help me quickly.. Basically, I have created a array to store all the data in a text file. The pointer of the array is sent to a function, which then populates it. Here is the code: void Data(char* theData) { ifstream txtFile(inputFile.c_str()); if(!txtFile.is_open()) { cerr … | |
I cannot for the life of me see where i'm going wrong. I've got a winsock class, the SOCKET is defined in the Header, but when I try to use it in a function I get a first exception crash. It's ground me to a halt (btw, for anyone who … | |
I am so lost on what to do so please help how ever you can. I must write a program to calculate the cost and time it takes to fill a swimming pool. * Inputs: Length, Width, and Depth of the pool (This is a gross simplification, since pools are … | |
Hi, i've been looking around for help with this problem but google seems to just send a load of crap my way so its finally got to the point where i'm asking specifically for help. Here is the code; void CWebRobotDlg::OnBnClickedDologin() { void* pElem= ElemFromID(L"username", IID_IHTMLInputElement) ; IHTMLInputElement* pTextBoxUser= (IHTMLInputElement*)pElem; … | |
I've written a program that allows you to calculate the definite integral of a function but I feel that it is limited and I want to rewrite it so that the user inputs an equation which is then stored as a string and then that string becomes the equation for … |
The End.