49,757 Topics

Member Avatar for
Member Avatar for vikrantiitr

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 …

Member Avatar for vikrantiitr
0
127
Member Avatar for Synapomorphy

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 …

Member Avatar for WaltP
0
80
Member Avatar for sellemaster

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 …

Member Avatar for sellemaster
0
159
Member Avatar for ramadan10

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

Member Avatar for ramadan10
0
189
Member Avatar for WolfShield

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 …

Member Avatar for ravenous
0
578
Member Avatar for 111100/11000

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

Member Avatar for WaltP
0
214
Member Avatar for triumphost

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 …

Member Avatar for triumphost
0
104
Member Avatar for jingxian.fs

/** @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; …

Member Avatar for Ancient Dragon
0
562
Member Avatar for im abcd

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

Member Avatar for im abcd
0
414
Member Avatar for jere.saw

Which of the following statements will display "Problem!" if bit 2 of flags is a '0'?

Member Avatar for WaltP
0
47
Member Avatar for glao

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

Member Avatar for glao
0
1K
Member Avatar for powerdink

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 …

Member Avatar for Brandon5122
0
6K
Member Avatar for majimboo04

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

Member Avatar for ravenous
0
85
Member Avatar for Carpetfizz

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 …

Member Avatar for Carpetfizz
0
313
Member Avatar for tensity

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 …

Member Avatar for tensity
0
213
Member Avatar for sharath27

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 …

Member Avatar for Ancient Dragon
0
256
Member Avatar for abhisekp

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.

Member Avatar for Ancient Dragon
0
61
Member Avatar for Andrei15193

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 …

Member Avatar for Andrei15193
0
196
Member Avatar for love_you_4rever

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

Member Avatar for rubberman
0
463
Member Avatar for Alochai

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 …

Member Avatar for Alochai
0
136
Member Avatar for Sendy Hipo

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 …

Member Avatar for Sendy Hipo
0
169
Member Avatar for triumphost

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 …

Member Avatar for triumphost
0
912
Member Avatar for slowlearner2010

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 …

Member Avatar for sanjayogii
0
512
Member Avatar for n.aggel

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 …

Member Avatar for Ambreshbiradar
0
1K
Member Avatar for getmymd

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 …

0
62
Member Avatar for harirock
Member Avatar for lxXTaCoXxl

These are just some of the more useful #define statements I've used in C++. These are some of the statements you'll use the most (in the case of template<typename T> when you use it, you use it a lot!). So I figured I'd post it for others, even though a …

Member Avatar for sepp2k
-4
266
Member Avatar for rithish

i need c++ e-book that should have programs from hello world,addition to vectors,map.in all books they cover only the concepts and finish by 3 programs in a topic.i need a c++ book that covers more than 500 to 800 programs please suggest me a good book.

Member Avatar for moutanna
0
77
Member Avatar for Tinnin

I'm trying to print out whether a number is prime or not up to and including the user inputted integer. The problem I'm having is that regardless of the user inputted integer, the loop only runs up to 4. How do I break from the nested loop without ending the …

Member Avatar for deceptikon
0
156
Member Avatar for glao

Hello , i am trying to understand how periodic boundary condition works.Of course, i understand what it is and how it works,just i am trying to implement it in c++ and i have some problems.( for now i want to make it work in 1d but i want it for …

Member Avatar for glao
0
3K

The End.