49,761 Topics
| |
llo all,* im trying to build a simple software to modify words. from undesirable content from the internet for example : f*cking into sexual intercourse or something like that im very new into programming so any ideas would help me a lot. thanks | |
**Bold Text Here**please send a c++ program to implement stack push and pop operations using random number generatos | |
[code] class A { public: A() { cout<<"ctor A\n"; } virtual void func(int x) { cout<<"\nsj\n"; } }; int _tmain(int argc, _TCHAR* argv[]) { A objA; int *vptr = (int *)*((int *)&objA);// address of the virtual table typedef void (*fnptr)(int); fnptr f; f = (fnptr)*((int *)vptr+0);// address of func() within … | |
Hello Friends, As we know, when we have virtual function in our class, compiler smartly puts vptr(virtual table pointer) in our class to access correct function at run time. Can i access this vptr in my program, to use/manipulate this directly? Regards, Vivek | |
Hello, wondering if someone can help me. I'm working with a .wav file, and, I need to collect the header information. The header contains (roughly, 20 bits/bytes) before the actual data. And, each of this data is contained at different locations in the file. I need to read a particular … | |
Here is the problem:-[Click Here](https://docs.google.com/document/d/1m-Jh1lFGf46NtrVJDYbETGVY_uGgxsKivYPMaBqI26k/edit). .I have been trying it for more time but not getting how to solve the polynomial equation after converting from base 'b' to decimal i.e. my algorithm is:- size of array = max(A.size(),B.size(),Z.size()); store A in array as int; add B as int element by … | |
First off this is a homework question, please don't do my homework for me as nice as that would be... I have to make a program that can search a library for an author or title from a file and output all the matching lines. I am very close but … | |
Hey, I'm trying to create a simple Yatzy game in C++ (I'm new to programming) anyway here is my code: void gameMechanics(int& numberOfPlayers) //NumberOfPlayers are not used in this function at this point. { int diceResult = 0; int fiveDices[4]; string throwDices; cout << "Throw dices?(y/n): "; getline(cin, throwDices); if(throwDices … | |
i have just started learning c++ and i like to know after writing a c++ code how do u process it to become a software so that you can intsall it in another computer and use it | |
Hello everyone, I am working my way through the Forger's Win32 tutorial and am on the "Creating a Simple Application" part currently. I am using C++ (instead of C in the tutorial) and the WinGW compiler. When I compile the below code I get this error: main.cpp: In function 'LRESULT … | |
| #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 << "This is enigma machine:" << endl; cout << "*NOTE:This … |
I currently use this to serialize data, write it to shared memory so that another program can reconstruct it and use it: template<typename T> void Serialize(unsigned char* &Destination, const T &Source) { CopyMemory(Destination, &Source, sizeof(T)); //Destination += sizeof(T); //Not sure if to add this or not. } template<typename T> void … | |
/** @file Graph.h */ #ifndef GRAPH_FLIGHTFINDER #define GRAPH_FLIGHTFINDER #include <iostream> #include <fstream> #include <sstream> using namespace std; //graph implementation class FlightGraph { //A Node class to create pointer for graph implementation class Node { public : string name; double cost; Node * next; // constructor Node() { name=" "; next=NULL; … | |
So I have coded this program on formula method . #include <iostream> #include <cstdlib> #include <cmath> using namespace std; int main() { int a , b , c ; cout << " Enter the values of a , b , c " << endl; cin >> a ; cin >> … | |
Which of the following statements will display "Problem!" if bit 2 of flags is a '0'? | |
I am trying to implement periodic boundary conditions for 2d lattice. I did: int boundary2d(int xpos,int ypos,int stepx,int stepy){ int x=4,y=4; //grid size int **matrix; //the grid matrix int i=stepx+xpos; int j=stepy+ypos; if (i<0) { do { i+=Nx; }while (i>Nx-1); } if (i>Nx-1) { do{ i-=Nx; }while(i>Nx-1); } if (j<0) … | |
Hello, Please help. Below is my assignment and the code I've got so far. I'm still getting errors on overloading the member function on the printDay and prevDay. Design and implement a class dayType that implements the day of the week in a program. The class dayType should store the … | |
how to code this.. in 200 to 1 i need to decrease by 3 and displaying odd or even numbers.. can you help me.. ty :) | |
Hello! I'm relatively new to C++ and I'm learning about classes and objects. I've learned most of what I know from YouTube tutorials and some books. Well, in almost all of those, they mentioned that it was poor programming practice to make all your data members public, inside of a … | |
Hello, I am trying to read text from a simple text file. The text file contains a list of emails and zipcodes, formated as follows: email@site.com;zipcode where zipcode is 5 integers. I am having an issue with the getline function, my error is "no instance of overloaded function". Could someone … | |
In my project I've 8 edit boxes and i need to set each box with different font. But my code is setting all the boxes single font.. So how can i modify it?? void CTrail3Dlg::OnBnClickedButton1() { UpdateData(TRUE); CFontDialog dlg; // get font for current dialog, just to fill in LOGFONT … | |
How to create a dynamic library of the following code double sum(double a, double b) { return (a+b); } P.S> I've no idea about all these stuffs. Pls brief me all these. Just to know how these works. | |
Hello, I have a question that can be deducted from the title. When to use C++ inline functions and when not? Should I declare my constructors/destructors as inline? Should I declare functions that have at least a loop as inline? People say that declaring *small* functions as inline is a … | |
Hi, I'm writing a code to print weekday (ie: mon, tue, wed, thurs, fri, sat, sun) when user enter day/month/year. However, I do not know why this code doesn't work right. I didn't get any error. It actually works, but it just printed "Monday" for whatever date I putted in. … | |
IDC_FUNCTIONALITY MENU BEGIN POPUP "&File" BEGIN MENUITEM "E&xit", IDM_EXIT END POPUP "&Help" BEGIN MENUITEM "&About ...", IDM_ABOUT END END This is an example of a part of the default Foo.rc file distributed with VisualC++ 2010(Express), this is how this section of code was shipped. I'm interested in knowing why Exit … | |
hi im trying to do Bjarne Stroustrup's exercise (calculator), it worked well but when im trying to add new function in the calculator (add new variable) it has bugs.. its not complete yet, because when i checked a bit, after i add string "name" inside `Token class`, it gives no … | |
Hey guys, I have two structs and I have two functions in two DLL's. DLL-A is attached to a process and collects data. When the data is requested by DLLB which is attached to a second process, DLLA maps the data for B to read. The problem is, I cannot … | |
This is my code that i put inside Form 1....(for ur info, im using microsoft visual c++ 2010). #pragma endregion private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { char szDSN[256] = "Driver={Microsoft Access Driver (*.mdb, *.accdb)};DSN='';DBQ=C:\Documents and Settings\user\Desktop\dbtesting.mdb"; } i try to compile my code and here I get hundreds of … | |
Hi to everyone! I want to create a simple chat application using udp sockets. I want to have 2 applications that will be able to talk to each other.In particular app1 will send msgs to p2 and p2 will display them in stdout. Then maybe p2 sends a msg to … | |
I am new to this forum but need help with some code. This is not for school, so help would be appreciated. I have an E Book Reader (Chinese Hanlin w/ Android OS). I need to be able to password protect the USB port, so nothing can be downloaded onto … |
The End.