49,761 Topics

Member Avatar for
Member Avatar for DeeperShade

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 …

0
85
Member Avatar for while(!success)

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() …

Member Avatar for while(!success)
0
4K
Member Avatar for <HHH>

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 …

Member Avatar for m4ster_r0shi
0
129
Member Avatar for Alochai

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 …

Member Avatar for Alochai
0
159
Member Avatar for bobyx

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 …

Member Avatar for iamthwee
0
151
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
716
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
326
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
138
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
310
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
709
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
118
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
97
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
532
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
724
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
267

The End.