48,986 Topics

Member Avatar for
Member Avatar for KittyKat15

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.

Member Avatar for David W
0
72
Member Avatar for trishtren

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 …

0
161
Member Avatar for rose_2

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 …

Member Avatar for rose_2
0
175
Member Avatar for phoenix254

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

Member Avatar for 2teez
0
659
Member Avatar for nathan.pavlovsky

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

Member Avatar for 2teez
0
582
Member Avatar for Sai Jyothsna

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 …

0
97
Member Avatar for Emily_2

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 …

Member Avatar for David W
0
365
Member Avatar for Joe_14

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

Member Avatar for David W
0
109
Member Avatar for surfingturtle

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 …

Member Avatar for David W
0
270
Member Avatar for can-mohan

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 …

Member Avatar for can-mohan
0
151
Member Avatar for Labdabeta

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 …

0
266
Member Avatar for Mr.M

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 …

Member Avatar for Mr.M
0
245
Member Avatar for cambalinho

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 …

0
151
Member Avatar for Ivan_9

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 …

Member Avatar for David W
0
2K
Member Avatar for TObannion

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 …

Member Avatar for David W
0
297
Member Avatar for 9tontruck

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 …

Member Avatar for ddanbe
0
166
Member Avatar for MedianHansen

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 …

Member Avatar for Slavik
0
6K
Member Avatar for עידן

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: ________ ________ _____ ______ _______ ________ ___ ___ _______ ________ |\ ____\|\ __ \|\ _ \ _ \|\ …

Member Avatar for rproffitt
0
152
Member Avatar for Vinny_1

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

Member Avatar for rproffitt
0
1K
Member Avatar for Shayan_1

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

Member Avatar for Shayan_1
0
207
Member Avatar for Tommybb

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 ?

Member Avatar for parul26sha
0
1K
Member Avatar for me vicky

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 …

Member Avatar for incomer
0
704
Member Avatar for Muhammad_99

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 …

Member Avatar for Suzie999
0
260
Member Avatar for v1shwa

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 …

0
119
Member Avatar for Tiffany888

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 …

Member Avatar for rproffitt
0
249
Member Avatar for .It.

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 …

Member Avatar for overwraith
0
5K
Member Avatar for Amr.Mohammad87

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 …

0
91
Member Avatar for Dimitar_1

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

Member Avatar for tinstaafl
0
190
Member Avatar for MilitantAT

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

Member Avatar for rproffitt
0
1K
Member Avatar for Hamza_9

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

Member Avatar for overwraith
0
342

The End.