48,986 Topics

Member Avatar for
Member Avatar for ebc3142

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

Member Avatar for LastMitch
0
196
Member Avatar for aily.ping

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 …

Member Avatar for Lerner
0
985
Member Avatar for Potgiesh

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

Member Avatar for rubberman
0
200
Member Avatar for tubzz

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 …

Member Avatar for NathanOliver
0
201
Member Avatar for tubzz

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 …

Member Avatar for Ancient Dragon
1
157
Member Avatar for shanki himanshu
Member Avatar for shanki himanshu
0
136
Member Avatar for tubzz

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 …

Member Avatar for tubzz
0
114
Member Avatar for tubzz

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 …

Member Avatar for tubzz
0
161
Member Avatar for oscargrower11

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 …

Member Avatar for Moschops
0
245
Member Avatar for nah094020

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 …

Member Avatar for nah094020
0
762
Member Avatar for Spanky_12

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

Member Avatar for mrnutty
0
239
Member Avatar for RounaqJJW

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[]) { …

Member Avatar for Lucaci Andrew
0
495
Member Avatar for triumphost

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()) {} }; …

Member Avatar for mike_2000_17
0
16K
Member Avatar for Potgiesh

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

Member Avatar for mike_2000_17
0
464
Member Avatar for eogunlolu

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 …

Member Avatar for rubberman
-1
198
Member Avatar for Asmaa_2

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 …

Member Avatar for gusano79
0
388
Member Avatar for rory.duncan.14

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 …

Member Avatar for Ancient Dragon
0
189
Member Avatar for greatman05

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 …

Member Avatar for Ancient Dragon
0
265
Member Avatar for craig.durnin.1

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 …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for vizz

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

Member Avatar for NathanOliver
1
386
Member Avatar for dustin.mcalister.58

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 …

Member Avatar for RvSon
0
197
Member Avatar for nana777

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 …

Member Avatar for NathanOliver
1
82
Member Avatar for beginner91

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 …

Member Avatar for beginner91
0
333
Member Avatar for dustin.mcalister.58

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

Member Avatar for nullptr
0
149
Member Avatar for anukavi

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 …

Member Avatar for anukavi
0
115
Member Avatar for coolbeanbob

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

Member Avatar for rubberman
0
190
Member Avatar for $Tweety$

Heyy could any1 plz suggest sum really tough programs dat can be written in c++??

Member Avatar for vmanes
0
258
Member Avatar for twofel

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 …

Member Avatar for pritaeas
-1
580
Member Avatar for SeanBlack0000

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 …

0
203
Member Avatar for eranga262154

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

Member Avatar for Gorf
0
2K

The End.