49,761 Topics

Member Avatar for
Member Avatar for aznlitomik3

I need some help on the void plusEquals/minusEquals and etc function I'm not sure how to start it Please can anyone help me do the plusEquals function so I know what I'm suppose to do or maybe some guides on how to approach it Below the problem is my current …

Member Avatar for aznlitomik3
0
1K
Member Avatar for Jennifer84

Hello! I have a task where I will connect to a webpage through a proxyserver with code. The information I have is this: Site to reach: [B][url]http://www.testing.com[/url][/B] ProxyIP and port: [B]109.123.70.47:80[/B] I have googled around but cant understand what the way to do this. In some way the web proxy …

0
53
Member Avatar for yznk

[CODE] #include <iostream> #include <string> #include <vector> using namespace std; class Digraph { public: vector<bool> visited; vector<string> tasks; vector<vector<int> > precede, postcede; vector<int> order; int numtasks, num1, num2; void resetVisited(){ for(int i=0; i<visited.size(); i++){ visited[i]=false; } } bool check(vector<vector<int> > checking, int pos1) //Returns true if there is a viable …

0
78
Member Avatar for Fbody

I'm really intrigued by OOP, I feel that I can help most people with OOP questions reasonably well, but I still have a lot to learn and there's something that bothers me. What is the best way to write the program's main() if I want to create a truly OOP …

Member Avatar for Fbody
0
159
Member Avatar for Kieran Y5

Hi, Is it possible to write and compile a cross-platform C++ Program in Visual Studio (C++) Express or Professional? I only ask this question (before starting on a big project) because I would like to support other platforms without changing my coding environment, if you get what I mean. Kieran …

Member Avatar for Kieran Y5
0
185
Member Avatar for mbouster

Dear all , I need your help on this. I will say how I am thinking the solution and any help will be much aprreciated. I will denote the husbands with the following notations h1 = 11, h2=12, h3=13 and their respective wives with the numbers w1 = 21, w2 …

Member Avatar for mbouster
0
2K
Member Avatar for knellgust

[CODE]#include <iostream> #include<string> using namespace std; class Book { private: string title; double price; public: Book(); void setTitle(string s); void setPrice(double p); string getTitle() const {return title;} double getPrice() const {return price;} bool hasKeyword(string key); }; Book::Book() { title="None"; price=0; } void Book :: setTitle(string s) { title=s; } void …

Member Avatar for alaa sam
0
177
Member Avatar for nepkancha

hello all, i am new here ,, and i need some help to do this array problem.. i can't figure it out.. any help will be greatly appreciated.. here is the question: [B]1- define an array of size 100 of integers, and fill it with random numbers between 1 and …

Member Avatar for WaltP
0
115
Member Avatar for Blenor

hai just made this code and i look through it many time.. i cant figure out why it isint woking.. any suggestions ? [CODE]#include<iostream> using namespace std; int main(); { system ("TITLE calc"); system ("COLOR 5"); char cChar; double dfistnumber; double dsecondnumber; char cDoagain; do { system ("CLS"); cout << …

Member Avatar for alaa sam
0
144
Member Avatar for Hassan.shah

hi need to write a program to read or write data to PLc by rs232 using modbus protcol how can i do it Thanks in Advance

Member Avatar for daviddoria
0
134
Member Avatar for Forte1292

Hello all. I'm creating a checkers program using C++. My board and pieces all display fine and everything works smoothly after pieces move and jump. The only problem is that after 12 successful moves it cuts off every time and I can briefly read something like BGI graphics error or …

Member Avatar for Mehwish Iqbal
0
159
Member Avatar for sadsdw

Hi friends, I'm having problems to use 2 consecutive "cin.get()". The second get() is not been accessed. But if debug I can answer the name of second file. Can you help me? Cheers, Sads [CODE]cout << "\nEnter the name of the first FILE : " << endl; cin.get (FileName1,256); cout …

Member Avatar for sadsdw
0
97
Member Avatar for Mr_PoP

hi there [CODE] #include "stdafx.h" #include <iostream> #include <mysql.h> int _tmain(int argc, _TCHAR* argv[]) { MYSQL *con; mysql_real_connect(con, "localhost", "alakazam","username","password",0,NULL,0); } [/CODE] Error IntelliSense: identifier "SOCKET" is undefined in file mysql_com.h how should i fix it?!!

Member Avatar for daviddoria
0
71
Member Avatar for skorm909

So i haven't been coding in awhile and i just decided to try and make a game again. nothing fancy just a simple text rpg. here's my code so far there's a few errors and if you know how to fix them that would be great... also i have some …

Member Avatar for alexchen
0
91
Member Avatar for rain.divine88

Hi all, I need a help from you. I'm writing a c++ console program that only accept only positive number. If the user enter an invalid number like negative and string, I want to display like [CODE]cout << "Enter a number";[/CODE] I want to loop this message until user enter …

Member Avatar for Shankye
0
155
Member Avatar for sadsdw

Hi friends, I'm newer in C++ and I'm trying write a code using ifstream, vector and substr. A) I have 2 problems: A.1) When I read files with small number of lines OK, but if I increase the number of lines, PROBLEM. As example: file1.txt (Work well with 9 lines, …

Member Avatar for daviddoria
0
197
Member Avatar for GURU1349

I'm a beginner in C++. I'm not studying it so I don't have a teacher and I don't have a book, a guide. The Internet is my only guide. Well here's my program: [CODE]#include <iostream> #include <math.h> using namespace std; int main () { int q; float x,y; Baslangic: cout …

Member Avatar for GURU1349
0
126
Member Avatar for Hey11

hello , i used an array using aggregration in OOP in order to insert multiple datatypes in the array and i wanted to convert it into dynamic array , so as to edit the entries and here is the code of the 2 classes and the main function [CODE]#include<iostream> #include<string> …

Member Avatar for daviddoria
0
221
Member Avatar for tech9x

i want my data can be used over every function, so i need a class to capture them, am i correct?? here is my outline, im not sure if i use it correctly, please help!! [code=c++] class CLASS { private: int * (something) string * (something) public: void (function) () …

Member Avatar for Greywolf333
0
248
Member Avatar for dudman

[CODE]#ifndef _EMPLOYEE_H #define _EMPLOYEE_H #define _ProductionWorker_h #pragma warning(disable: 4996) #include <cstring> #include <iostream> #include <cstdlib> using namespace std; //const int SIZE = 40; // Array Size class Employee //Definition of Employee Class { private: //char employName[SIZE]; char *employName; int employNum; int hireDate; public: Employee(); //Constructor Employee(char *e) {employName = new …

Member Avatar for dudman
0
153
Member Avatar for Raja Paul

Hi, I want to make a tree view control which can display the file lists in my machine's hard disk. I want to do this using C/C++/VC++. Someone can help me out please regarding this matter.....

Member Avatar for jonsca
0
104
Member Avatar for blackrandom

Okay so I have been debugging for hours and I don't understand any of this...I'm kinda mad about not knowing and when I research it all I find how it works but not really how to implement it. I know the general theory of a binary search tree but I'm …

Member Avatar for blackrandom
0
147
Member Avatar for knellgust

[CODE]#include <iostream> #include<string> using namespace std; class Book { private: string title; double price; public: Book(); void setTitle(string s); void setPrice(double p); string getTitle() const {return title;} double getPrice() const {return price;} bool hasKeyword(string key); }; Book::Book() { title="None"; price=0; } void Book :: setTitle(string s) { title=s; } void …

Member Avatar for knellgust
0
100
Member Avatar for nickx522

i need help writing display of average function. i find the average in first function "int Main()". it needs to be rounded to 2 decimal points. int display_avg( //dont know what parameters should be)

Member Avatar for Akill10
0
93
Member Avatar for dinners

[CODE] bool isSame=false; do { bool isSame=false; for (int i=1; i<=corners; i++) { cout << "Please enter the cordinates for corner " << i << ':'; cin >> x[(i-1)] >> y[(i-1)]; } int k; for (k=0;k<(corners-1);k++) { int j; for(j=(k+1);j<corners;j++) { if ((x[k]==x[j])&&(y[k]==y[j])) { isSame=true; } } } if (isSame==true) …

Member Avatar for dinners
0
271
Member Avatar for knnccb

i just got an exercise i am asked to do and i have no idea what to do. I am asked to use recursive to print a pattern without using loop: * ** *** **** **** *** ** * And also : **** *** ** * ** *** **** Any …

Member Avatar for knnccb
0
114
Member Avatar for djhog

#include <iostream> #include <fstream> #include <string> #include <iomanip> using namespace std; int main () { int Count= 0, oldCount, lineNo= 0, pos; string searchStr, testStr, testSearch, fileName, intStr; cout << "File name? "; getline(cin,fileName); ifstream fin(fileName.c_str());; if (!fin) { perror(fileName.c_str()); exit(1); } cout<<"Search string? "; getline (cin, searchStr); testSearch = …

Member Avatar for jonsca
0
168
Member Avatar for ScreamingPsycho

Hello, first time here.This program reads in a file of different names and uses void options to put them in various order. On line 111, 116, 121, 126, 131, I am not sure what to put inside the parenthesis. [EX: option1(NotSureWhatToPut)]. I have tried to put 'nextStudent' and get a …

Member Avatar for ScreamingPsycho
0
198
Member Avatar for jmcorpse

[CODE] #include<iostream> #include<cstddef> using namespace std; typedef int* IntArrayPtr; void getSize(int& size1, int& size2);//Function declaration for getSize void createArrays(int& size1, int& size2);//Function declaration for createArrays void fillArrays(int& size1, int& size2);//Function declaration for fillArrays int main() { int size1;//Variable that will be passed from one function to another int size2;//Variable that …

Member Avatar for jonsca
0
208
Member Avatar for shotbylammi

I am currently in a C++ class. We have using Python and my assignment is to do a lab that I have done in python 2.5 in C++, although I have no idea where to begin besides opening Dev C++ or Bloodshed. Could anyone please tell me how I begin …

Member Avatar for Fbody
0
168

The End.