48,986 Topics
| |
I am working on a project that is due fairly soon. I am stuck and having trouble figuring out how to automatically make the fox in this problem move aggressively. Could anyone help? I am attaching the problem description. | |
Hi, I was wondering if anyone could help me or point me in the right direction. Iv been developing a source to source compiler for some time, so one language being translated to C++/C. Now the source has been translated i wish to package a windows and linux c++ compiler … | |
I need some help in that program to read 2 numbers and print sum of them the program will be tested on one or more test cases. The first line of the input will be a single integer T, the number of test cases (1 ≤ T ≤ 100). Followed by … | |
How can i return an array from function in c++.. I have this code: #include <iostream> #include <string> using namespace std; int ordincreasente(int num[], int len){ int curMax,curMin,ordinato[len]; for(int i=0; i<(len-1); i++){ for(int j=i+1; j<len; j++){ if(num[i]<num[j]){ swap(num[i], num[j]); } }//end second loop }//end first loop for(int i = 0; … | |
Hello Programmers! I am working on a C++ phone number class. The class has overloaded stream manipulators, cin and cout for output. It has three private members: areaCode, exchange, and line, strings that represent the numbers that are used in a telephone call. It is supposed to default to (000) … | |
Question: Trying more than two weeks but not getting corect program due date is already over.please hel me anyone For this project, the students are to use MS Visual Studio to program and run a simple multi-process console program using MPI in visual C++. The MPI libraries can be downloaded … | |
I'm trying to write a program that has a user input student names, their ages, their GPAs, and their graduations dates (i.e. 'F13', F for Fall, S for Spring, then the last two digits of the year). This information goes into a linked list, then the user can search a … | |
My assignment is to write a c++ program which does statistical analysis of a group of exam scores. Up to 100 scores may be entered. All scores should be validated within the range of 0-100. A (-1) will be entered to signify the end of data. Scores may be decimal, … | |
Dear members, Am learning C++ by Yashawant Kanetkar from his book "Let us C++", its been said his books are good for beginners who do self study like me, but I find some conflict of logic in this book, please help me clear those... The book says......the following code fragment … | |
Hi , Below is the code of template smart point implementation. in below code snippet we are not allocating any memory in smart pointer constructer for ptr but still delete is called in destructor for ptr. Is it right way to implement the same ? can we delete the pointer … | |
Hello, I am working on a moderately large web development system and have been charged with developing the server-side application for the web site. As a primarily local developer I have by far the most experience in C/C++. My favourite language is Ada, just to give you a sense of … | |
Hi Dw. I'm developing a software but now due to some complexity of the program I had to do some engine with C++ and I want to be able to call and receive the events from a service. Here's the C++ code that receives calls when an application tries to … | |
i have my own region class: class region { private: BYTE* Get24BitPixels(HBITMAP pBitmap, WORD *pwWidth, WORD *pwHeight) { // a bitmap object just to get bitmap width and height BITMAP bmpBmp; // pointer to original bitmap info LPBITMAPINFO pbmiInfo; // bitmap info will hold the new 24bit bitmap info BITMAPINFO … | |
Hi, could somebody help me how to write a function that sort elements in two dynamic stacks(contained in an external file) by the quicksort method?I think I have written the other functions correctly but I find hard time on this one.Please help me if you can, I will appreciate it … | |
I've been away from programming for a bit, and I never really learned pointers that well. What I'm trying to do now is code from a model. Here's a link to the model: [Click Here](http://s1042.photobucket.com/user/AlanTuring11/media/123_zpsx47kycfm.png.html?filters[user]=144321721&filters[recent]=1&sort=1&o=0) My problem is that my output is not changing when I enter events. The program … | |
Hi, I am dealing with the shape drawing functions in C# and I am trying to resize DrawingGroup after drawing some shapes on it. Here is my code: DrawingGroup drawingGroup = new DrawingGroup(); Pen redPen = new Pen( Brushes.Red, 2 ); DrawingContext drawingContext = drawingGroup.Open() drawingContext.DrawRectangle( null, redPen, rect); double … | |
At first, here's my source code: [code] #include <SDL.h> int main(int argc, char* argv[]) { //initialize SDL and the video system. if (SDL_Init( SDL_INIT_VIDEO)<0) return -1; //signal SDL to change the text of the main window to SDL "Hello World". SDL_WM_SetCaption("Hello world","Hello World"); //Create an SDL_Surface object, which represents, the … | |
Hi, i want to print game over screen for my snake game in c++. my screen size is 24*80, i dont want to change it. i try to print somethink like this: ________ ________ _____ ______ _______ ________ ___ ___ _______ ________ |\ ____\|\ __ \|\ _ \ _ \|\ … | |
**Task** Your task is to write a program that will draw graphs and output them as a full colour image in the .ppm file format and display them using a suitable external image viewer (IrfanView). The program will use code generated sine waves, and harmonics of these, to calculate and … | |
Hi!! i am new to C++. Can anyone help me to understand this code please... I can't really get it..... like these: && , endl. What these do and what do they stand for?? #include <iostream> using namespace std; int main () { int a,b,c; cout<<"Enter three integers :"; cin>>a>>b>>c; … | |
I know the general answer would be a Programmer, But more specificlly what types of jobs would you program for? What fields benifit from C++ programmers ? | |
Can anyone please look at code and tel what is issue in Laptop::Laptop(int wdSize, int memSize,int storSize, int spee,int wid, int hei , int len , int wait ) { Computer::Computer(int wdSize, int memSize, int storSize , int spee); width=wid; length=len; height=hei; weight=wait; } Computer::show(); which is a base class … | |
I'm trying to findout the size of the array. But instead of giving it 5 it is giving 2. Which is not correct. Formula for finding the size of the array is this. int size = sizeof(pArr)/sizeof(int); [You can see the working code here.](http://coliru.stacked-crooked.com/a/780601b9bccc03e7) For your copy code is shown … | |
Hello, I've been asked to create a tool using 3rd party API. The API requires to send the user details in encrypted format. The problem here, they didn't mention what kind of encryption we should do. They just provided a two C++ functions to encrypt the data. I'm a PHP … | |
I am trying to work the next and previous button to read or navigate throughrecords, please help me to correct this, I'm stuck here: Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click Dim k As Integer Dim i As Integer k = 1 i = k + 1 … | |
Hi all, first thread in here. I usually don't open my executables with any sort of editor, but for the sake of curiosity I've tried opening one. And what I've found is not that funny: I've found myself able to edit every kind of string. Of course you have not … | |
void assign(size_type n, **el const T& el = T()**) This function is a member function of the STL list class and I do not understand the bolded part. I understand the const T& el is a reference to a constant parameter which means I cannot change the value/content of the … | |
I have to write a hangman game in Cpp which choose random words from txt file using binary search tree. Here is the code - compilation is successful, but its not working properly, its crashing. Exception - Segmentation fault: 11 Row - if (el.length() <= p->n.length()) Can someone help me? … | |
How can I return to the main menu in this simple C++ program? Thanks in advance. #include <iostream> using namespace std; int main() cout << "Main Menu" << endl; cout << "What would you like to read about?" << endl; cout << "1. Programming Paradigms" << endl; cout << "2. … | |
#include<iostream> #include<conio.h> #include<string.h> #include<iomanip> #include<iostream> #include<fstream> #include<Windows.h> using namespace std; class book { char book_number[30]; char book_name[50]; char author_name[20]; public: void create_book() { cout<<"\nEnter The Book Number: "; cin>>book_number; cout<<"\nEnter The Name of The Book: "; cin.ignore(); cin.getline(book_name,50); cout<<"\nEnter The Author's Name: "; cin.ignore(); cin.getline(author_name,50); cout<<"\t\t\n\nBook Created Successfully..."; } void … |
The End.