48,986 Topics
| |
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 … | |
I need help to create **Process monitoring program.** (services, system, and user-run processes) If any **software/Process** wants to run, this program display it's details and ask user to **allow or block software/Process.** Also display List of All Running Processes with it's address(process related with perticular software) with **stop/block process** option. … | |
Hello, it's me again, and I'm stuck again. I need to enter the highest and lowest temperatures for seven days, which the program will then store in two columns, with the average of each column stored in the bottom row. I got it working and everything, except that it'll only … | |
Depreciation is the cost of value of an item offer a number of years from the time of purchase. Another method of calculating depreciation is the straight line method. If value is the purchase price of the item and it’s to be depreciated over n years, then value is the … | |
so i created a client server program using tcp that works fine. but now i want to use broadcasting (which uses udp) so i'm changing to change my code but i keep running into problems. when i run my code the error message "ERROR binding: 10047" and that error means … | |
Before I go any further, I just want say yes, this is the same code from my last post, and no this isn't a repost. Now that I know that I need a loop in my code, all I need to know right now is where to put the loop. … | |
Hi , Working on VC++ 2012. "error LNK2005: "class std::basic_ofstream<char,struct std::char_traits<char> > Createonly_logs" (?Createonly_logs@@3V?$basic_ofstream@DU?$char_traits@D@std@@@std@@A) already defined in UtilityFunctions.obj I have defined a text file (for writing the output) under LogFiles.h #include <fstream> using namespace std; ofstream Createonly_logs("E:\\MyProj\\MTEST\\CreateFile_logs.txt"); I have created three .cpp under the project and all these cpp uses … | |
Hello, I am working on an assignment. I am given the code below. I am trying to figure out what the line directly below is doing. Is this a functor? I am getting a compiler error saying the compiler expects a ';' before the '*'. I've searched for functor examples, … | |
Heyy could any1 plz suggest sum really tough programs dat can be written in c++?? | |
hi, Menu on a Windows Form for Dev C++ hi, i have devc++ version 5.2.0.3 after compiling this prog i got following message: 110 46 C:\Users!__DEVCPP PROJEKTE\menu.cpp [Error] cast from 'HMENU {aka HMENU__*}' to 'UINT {aka unsigned int}' loses precision [-fpermissive] 100 56 C:\Users!__DEVCPP PROJEKTE\menu.cpp [Warning] deprecated conversion from string … | |
I am trying to create a graph from a 2d matrix of booleans. When the index [i][j] == 1, I need to create a link or edge from node[i] to node[j]. I am doing some thing wrong. I have created a class file with a struct node and some basic … | |
Hi all, Using my application I've found a file path anywhere on my machine and store the full path in a CString variable. That is full path, like this, [CODE]G:\Work On\CPP\001_002_003.txt[/CODE] What I want to do is, find the name of the file(without the extension), 001_002_003 according to my example. … |
The End.