49,761 Topics
| |
Yes, me again, here to prove i'm an idiot. :) Ok, all previous problems solved (wrapping win32, and getting winsock to actually do ANYTHING) My problem now is that recv is very random. Sometimes it'll recieve data, sometimes it'll return -1. WSAGetLastError (still not entirely certain I should be using … | |
Hey guys, I was wondering if anybody knew of a method to check if an element in a object array was empty. for example, lets say I have the class "XYZ" class XYZ { int x; string y; }; then in main if i declared the object array: int main() … | |
i want to read each line of my file in seprated string what i have achieved till now is i can read the whole lines in one string and now i want to read each line in a sprated string any help; #include <cstdlib> #include <iostream> #include <fstream> using namespace … | |
So, i've been redesigning the program I've been making to make reusable functions, rather than copy/pasting almost identical code to several different functions (which is what I would have ended up doing). These upcoming sections of code are functions designed to, on a button press, navigate to a URL, scrape … | |
Hello,everbody. In many cases we should fill some fields on the different forms and in the different places of those forms which are the same like as; names,address,numbers,etc. I want to write a program with C++ or other languages that resident in a PC so that it can be simply … | |
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 … |
The End.