49,761 Topics
| |
impliment the selection sort algorithm to sort the elements in a two dimentional array of order 3*4 in descending order. the program should prompt the user to input 12 element, sort and display the elements in the matrix format. | |
Hello, I have a course that is Operational Systems.. My lecturer doesnt explain so much and after He say, You must solve this problem, because u r a programmer.. I have such a problem with linux programming. I put my code here, He wants, I must allow multi-client to server. … | |
guys, how to make a simple program that can combine basic C++,array,function and pointer altogether.can anyone help me please? thank you! :) | |
I wrote a large project dealing with images, files, and WINAPI functions. I decided to add RichTextEdit to it and used the msfedit.dll.. Turns out that it only supports UNICODE style strings and chars and my entire project is std::strings and LPCSTR's, etc.. None of the WINAPI functions are unicode … | |
I was going to post this in a thread, but it turned into something a bit more serious and may be useful as a code snippet. The code shows three files: * menu.h: The header file for the menu library. * menu.c: Implementation of the menu library functions. * main.c: … | |
Hello everyone, im new here and dont know yet most of the policies.. but i have been reading lots of your C++ codes, mostly, codes made by Narue.... i wonder if you someone could help me make a code for pascal's triangle wherein the ouput would look like a triangle … | |
I am writing a program for class but stuck. I need my program to pick adult, child, student or senior, if I enter any of them. #include<iostream> #include<iomanip> #include<string.h> #include<fstream> using namespace std; int main() { int choice; int months; int Adult, Child, Student, Senior; cout<<"Enter the number of months … | |
Hi, Can anyone tell me how to create a class in C++ such that, the instance of that class cannot be created on stack? Am not able to figure out how to do it. Thank-you in advance, Sri | |
I have to update a road tunnel lighting program I wrote for a company. They now want a new standard to be applied, but with the option of switching between standards real time. And there will be other standards in the future. Currently the single object which calculates the lighting … | |
Greetings While reading I encountered a statement I did not understand what does it mean "Cout is a predefiend object in C++ **to correspond to the *standard output stream*** 1- What is that exactly mean? 2- what is the *standard output stream* & *standard input stream*? | |
The function called skipped over when i run the program. What's the problem? #include <iostream> using namespace std; void searchId(int id[], int& idNum); int main() { int idNum; int count; int *id; int Numid; cout << "Please input the number of id numbers to be read "<<endl; // cin >> … | |
Hi, I'm developing an application which needs to check user-inputted credentials against a Mysql database running on a web server. Does anybody know how I could communicate between c++ and a PHP or Ruby on Rails page and then parse the results back to the client? Many Thanks | |
I can't detect the problem to this program that i've made. there's a problem for sum and average. #include <iostream> using namespace std; float sum(float[], int); // Declaration of function float average(int, float);// Declaration of function int main() { int numMonth; int count; float *sales; float userInfo; cout << "Please … | |
Hey guys i'm having a lil trouble with object serialization. student * s = new student("Mike",200014); ofstream ofs("student.dat",ios_base::out | ios_base::binary); ofs.write((char*)&s,sizeof(s)); ofs.close(); If student was a class with attributes `studentName:string` and `studentNumber:int` would the above code write the object pointed by s to the file `student.dat` ? | |
menu driven program to perform the following stack operations using a linked list: push pop and display elements. #include<iostream.h>//header file i/o stream flow #include<conio.h> class Stack { int A[10]; int top; public: Stack() { top=-1; } void push(); void pop(); void show(); }; void Stack::push() { int x; cout<<"Enter the … | |
write a menu driven program to create a linked list, insert an item, delete an item, and display the list of items. the program should contain a class with the required data and functions. #include <conio.h> #include <stdio.h> #include <stdlib.h> //Structure containing a Data part & a //Link part to … | |
why this [code](http://ideone.com/hfYD8V) is giving me runtime error? | |
declare two dynamic arrays of integers, input **size** needed for the arras, allocate **size** integers, initialize all elements to 0, prompt the user to input **size** elements in the first array, diplay the elements, copy the elements to the second array after deleting duplicate elements, and display the elements from … | |
write a binary search algorithm to look for the presence of a search key in a single dimensional array of 10 elements. prompt the user to input 10 elements and the search key. display meaningful messages after the search operation. #include<iostream.h> #include<conio.h> void main() { int p[10]; int search_key; cout<<"\n … | |
Following a tutorial, I built a small sample program that uses winsock. It compiles, but there are a few different places I'm not sure what's happening with the pointers. Full source is available [here](http://pastebin.com/NTdCWhWr) Line 25: `struct hostent *host;` As near as I can tell, this creates a pointer to … | |
alright guys so am havign trouble finding a way to search for seats that are toghether, my pgram consists of a theater with 20 x 10 seats, i have created a seatSelection class and the theater file which has the main. Ok so heres a sample output of how it … | |
#include <iostream> using namespace std; void get_temps(int choice) { if(choice == 1) { double temps[12]; for(int i = 0; i < 12; i++) { int month_num= i+1; cout << &"Please enter the average temperature for month " [month_num]; cin >> temps[i]; } } if(choice == 2) { double temps[10]; for(int … | |
Program to Find the words starting with a or A from the source code itself and then modify it by removing the words from the source code and put it in another file. The following code doesn't work. Pls Help!!! #include<iostream.h> #include<conio.h> #include<fstream.h> #include<string.h> void Write(fstream &a, char b[]) { … | |
Assuming a simple class like below and the main like below, will the class variable be stack/heap allocated depending on how the class is instantiated? OR will the class variable be allocated depending on how it is implemented? class Foo { private: std::string Bar; public: Foo() : Bar(std::string()) {} }; … | |
Hey guys i have an advanced programming project , which is to run on both linux and windows operating systems. And i wanted to know if there is an IDE with drag and drop features which i can use to code the graphical user interface | |
Write a program that does the following in C++ Need help •The program should keep an array of 12 structures. Each element is for a different cyclist. •Functions to accomplish the following: ◦When the program runs it should ask the user to enter the data for each cyclist. ◦It should … | |
I'm asked to Write a program to create a calendar and I have a problem with defining the first day in every month whether it's satureday or sunday, etc can anyone give me a hint to fix this BTW, I'm not allowed to use functions :/ I'm disappointed about my … | |
Thanks in advance for anyone who can a)understand this, and b) give any help in my struggles. We are coding in C++, have half a circle, starting a a certain point (e.g. (0,-310)) and finishing at a certain point (0,310). We have the radius, and we have the equation X^2 … | |
This is homework. I have been tasked with creating a new dialog in WinMerge that provides line stats for every open file. It should show total lines, lines modified and lines deleted. I am working on implementing the total lines part. I have already created the dialog, a class for … | |
Hi there. I am trying to create C++ code that allows User Input in selecting a variety of fields, then it will calculate many different angles and show the users the results, as well as a graph. However, it has been suggested to us by our lecturer that it may … |
The End.