49,757 Topics

Member Avatar for
Member Avatar for ImranAzmar

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 …

Member Avatar for iamthwee
0
139
Member Avatar for jonnyc++

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 …

Member Avatar for jonnyc++
0
714
Member Avatar for vickymehta6789

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 …

Member Avatar for sepp2k
0
105
Member Avatar for keryll

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

Member Avatar for keryll
0
324
Member Avatar for 111100/11000

**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 << …

Member Avatar for ravenous
0
144
Member Avatar for Geeksoftie

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

Member Avatar for jimzandueta
0
134
Member Avatar for mochiboo5

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 …

Member Avatar for mochiboo5
0
309
Member Avatar for Alochai

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); // …

Member Avatar for Alochai
0
1K
Member Avatar for letterG

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' || …

Member Avatar for letterG
0
163
Member Avatar for mpyap

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 …

Member Avatar for VernonDozier
0
1K
Member Avatar for love_you_4rever

Just a short question Can you help me please? thank you so much :) **What is printed by the following C++ code? cout << "'\\\"'";**

Member Avatar for WaltP
0
81
Member Avatar for np complete

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++ ?

Member Avatar for deceptikon
0
696
Member Avatar for 111100/11000

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]; …

Member Avatar for Schol-R-LEA
0
116
Member Avatar for Vasthor

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 …

Member Avatar for Vasthor
0
270
Member Avatar for sozan.galal

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 :)

Member Avatar for m4ster_r0shi
0
168
Member Avatar for love_you_4rever

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 …

Member Avatar for love_you_4rever
0
96
Member Avatar for triumphost

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, …

0
88
Member Avatar for userIT

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 …

Member Avatar for userIT
0
531
Member Avatar for complete

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.

Member Avatar for Ancient Dragon
0
79
Member Avatar for dixit ankit

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 …

Member Avatar for WaltP
0
151
Member Avatar for Bumpehh

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 …

Member Avatar for Bumpehh
0
716
Member Avatar for XodoX

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 …

Member Avatar for rubberman
0
227
Member Avatar for snesnerd

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 …

Member Avatar for mike_2000_17
0
2K
Member Avatar for np complete

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 ?

Member Avatar for mike_2000_17
0
249
Member Avatar for kirenemook12

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 …

Member Avatar for mike_2000_17
0
265
Member Avatar for phorce

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 …

Member Avatar for Ancient Dragon
0
157
Member Avatar for DeeperShade

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 …

Member Avatar for DeeperShade
0
234
Member Avatar for amelia.rox

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 …

Member Avatar for WaltP
0
673
Member Avatar for Alochai

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; …

Member Avatar for Alochai
0
645
Member Avatar for Microno

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 …

Member Avatar for Microno
0
163

The End.