49,761 Topics

Member Avatar for
Member Avatar for iremix09

Hi, Im currently making a program which would connect to a server which I got working perfectly, however I've gone to work on another feature for the program and that displaying the server details via an image. I've got the image I want its on the internet, but how can …

0
47
Member Avatar for salah_saleh

Hello, I have a problem in reading p5 PGM file: [CODE] ifstream::pos_type _Start, _End, _Size; ifstream::off_type _newStart; char * memblock; vector<vector<int> > initMatrix ; std::ifstream inf; inf.open("a.pmg", ios_base::in | ios_base::binary); if (inf) { std::string line; for (int i = 0; i<3 ;i++)//skip the first 3 lines that contain the info …

Member Avatar for mazzica1
0
812
Member Avatar for kashyapchhabria

I have been running the program but it quits in the end on pressing alt+f5 it says BGI Error:- Graphics not Initialized(Use Initgraph) but i have sphecified the graphics driver properly and also egavga.bgi is also there in the folder bin

Member Avatar for Narue
0
195
Member Avatar for phorce

Hello, I have two arrays that contain different numbers that I need to compare with another array.. e.g. Array 1: 10 20 40 70 Array 2: 5 3 10 18 2 Basically, I want to write a program that calculates the highest value each array and then swops the values.. …

Member Avatar for Narue
0
167
Member Avatar for smata

please help me using C++ to create the following hierarchy of classes; (1). a [B]Person[/B] class with fields for name (type String) and an email address (type String). it should contain two constructors: one without input , a second one with input name of type string and email of type …

Member Avatar for tkud
0
187
Member Avatar for rhn94

Hey guys. I'm trying to create a program which adds, searches & removes items from an array & i've been messing around with the code, trying to find answers on the internet but so far no dice. Could any of you help out? [CODE] void removeString(List& s, string strKey, const …

Member Avatar for rhn94
0
191
Member Avatar for pendo826

Hey i have no idea whats goin wrong with this i think its to do with the fact that its in private but i have an error with calling weapon in the monster class (Monster.cpp) the error states that it is inaccessable :S here is my code: [CODE] //Monster.h #ifndef …

Member Avatar for pendo826
0
127
Member Avatar for Rubinder singh

[CODE]void inorder(struct node *r) { if(r!=NULL) { inorder(r->left); printf("\t %d",r->data); inorder(r->right); } }[/CODE] in the above code when the last element is reached i.e r->left becomes null then when inorder(r->left) is called it will send a null value to the function and if condition becomes false so the it'll come …

Member Avatar for mikrosfoititis
1
166
Member Avatar for jackly94

Can some one help with this please. I need to update a Passengers Name, im using Strings not Char. [CODE] if (choice == 2) // Updates Record.. { merge_sort(0,N_PASSENGER-1); cout << "\n\t Enter the Seat Number:"; cin >> key k=binarySearch(passenger, 0, N_PASSENGER, key); // Search Array if(k>=0) cout << " …

Member Avatar for jackly94
0
95
Member Avatar for riahc3

Hey Im currently working on a application server written in Java but to use information from a C++ program. The company seems to agree that rewriting thousands of lines of code would be time consuming and simply making libraries of key functions of the C++ program and then passing them …

Member Avatar for riahc3
0
2K
Member Avatar for izh

Hello, I joined here desperately asking for your help I have an assignment about creating a program that loads a text file given. the text file contains many lines and those lines are questions and answers it is on this sequence question answer question answer and so on so we …

Member Avatar for izh
0
246
Member Avatar for Jackk123

Soo last year, if im not mistaken , i asked for help with the random numbers generator. I didn't do C++ for quite some time, but i started again. So here is what i have : [CODE]#include "stdafx.h" #include <iostream> #include <fstream> #include <ctime> using namespace std; int main(){ srand(time(NULL)); …

Member Avatar for Jackk123
0
142
Member Avatar for waqarrashid33

hello.. Can any one provide me the code in c++ of deleting the folders or a folder that is not empty..plzz

Member Avatar for Ancient Dragon
0
34
Member Avatar for ineedurhelp

I know that this is a c++ forum but im a college student and i cant practice the programs without clearing this problem coz most of the programs require "resource.h" this program is to attach a menu to a window [code=c++] #include<afxwin.h> #include"resource.h" class myframe:public CFrameWnd { public: myframe() { …

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

Hi, i have a project using basic inheritance to output shapes, but i would like to make it draw the shapes aswell. Does anyone know where i can find tutorials on how to draw shapes in dos using C++? thanks

Member Avatar for Fuseteam
1
5K
Member Avatar for woody363

I'm having difficulty getting graphics into my C++ program. using Ubuntu 11.10 I /think/ my problem is simply my inability to download and install graphics libraries. Basically at the #include ... section of code i get an error every time about being unable to find xyz which i haven't managed …

Member Avatar for woody363
0
288
Member Avatar for lolwut25

I have an assignment where I have to write a program to prompt the user for a file name and location (it is a text file), once the user has entered that, a menu pops up and gives the user 4 options and asks which one they would like to …

Member Avatar for Lerner
0
2K
Member Avatar for Despairy

is there a warior i can do the following: lets say i have [CODE]string userChoice;[/CODE] assume i have a Warrior class with move function in it is it possible to define : [CODE]#define WARRIOR "Warrior"[/CODE] and than use [CODE]userChoice=WARRIOR;[/CODE] and call the function [CODE]userChoice.move()[/CODE]? [CODE]void play(char gameWorld[][BOARD_SIZE]) { Warrior War(1,1); …

Member Avatar for Despairy
0
152
Member Avatar for vlaskiz

So here I am, having a difficult time figuring out what's the problem, first of here's the code: [COLOR="red"]Preke.H[/COLOR] [CODE]#include <string> #include <sstream> #include <iomanip> using namespace std; class Preke { private: string pav; // prekÄ—s pavadinimas int atdata; // atvežimo į parduotuvÄ™ data int pardata; // pardavimo data int …

Member Avatar for mikrosfoititis
0
273
Member Avatar for rsashwin

Hi guys, I am implementing a singly linked list. The thing is whenever my str_temp goes above 12-15 elements, i get this error malloc: *** error for object 0x1099008b8: incorrect checksum for freed object - object was probably modified after being freed. *** set a breakpoint in malloc_error_break to debug …

Member Avatar for mazzica1
0
153
Member Avatar for smata

Consider a used-car yard called [B]Second Car Sales[/B] that needs to store details of the vehicles they have in stock. For each vehicle, we need to store the following details; Registration number, Make, Distance traveled in miles,Buying price and Selling price($) and Name of previous owner. [U]Required[/U]. (1) You are …

Member Avatar for Schol-R-LEA
0
129
Member Avatar for croussou

Hi guys, I have been given a task in my C++ course to develop an application that will ask the names of the students and store the entered values into a string type array. Considering each student has participated in four exams, the program should ask the points received and …

Member Avatar for croussou
0
242
Member Avatar for pendo826

Can Anyone advise me on the problem with the namespace in this code im getting an error. [CODE]//Main. #include "Weapon.h" #include "Room.h" #include <iostream> #include <fstream> using namespace std; int main() { ifstream myfile; string line; myfile.open("BronzeSword.txt"); if (myfile.is_open()) { while ( myfile.good() ) { getline (myfile,line); cout << line …

Member Avatar for pendo826
0
154
Member Avatar for phorce

Hello, I'm trying to read in words from a text file that look like: The World Fell Over etc.. But it doesn't seem to be working.. I've written some code however it will only show the first word OR loads of question marks.. [code] string dictionary() { string words[500]; ifstream …

Member Avatar for thines01
0
134
Member Avatar for karmstrong

So my code will compile and I do get output but it does not look the way its suppose to. I'm also not certain I am doing the virtual functions properly Expected Output Telephone Number : NPA-NXX-Line Customer: CustomerName Number of Working Lines: NumWorkingTNs Current Output derived class WorkTelephoneNumber constructor …

Member Avatar for mazzica1
0
172
Member Avatar for stereomatching

[code] struct S { double operator()(char, int&); }; int main() { boost::result_of<S(char, int&)>::type f = 3.14; // f has type double } [/code] OS : win7 compiler :gcc mingw4.6.2 error message : error: no class template named 'result' in 'struct S'| error: expected ';' before 'f'| error: 'type' is not …

Member Avatar for vijayan121
0
215
Member Avatar for naifa55

hi, How to write code to convert to prepare one's complement and tow's complement in c++

Member Avatar for naifa55
-1
94
Member Avatar for pendo826

Hey im a real noob at c++ and im trying to understand creating rooms setting a default and using a .txt file for room details. but i dont understand it. Im looking at some code from my lecturer and i dont understand were the wiz0-2.save comes from can some tell …

Member Avatar for mikrosfoititis
0
132
Member Avatar for bobytch

Hello everyone in this activity i should use if, else if, Boolean, for loop, do while loop ok here is the OUTPUT i must do: GRADING SYSTEM! 96-100 =1.00 94-95 =1.25 92-93 =1.50 90-91 =1.75 88-89 =2.00 86-87 =2.25 84-85 =2.50 82-83 =2.75 80-81 =3.00 78-79 =3.25 75-77 =3.50 74-below …

Member Avatar for CSloan7597
0
189
Member Avatar for ziggystarman

Passing Managed ByteArray to Native C++ DLL Anyone could help regarding passing ByteArray containing image data from axis camera to Native C++ DLL, Both compile OK, but DLL does not write ByteArray data to file?, just wondering if this is the correct way to pass ByteArray's to C++ DLL's here …

Member Avatar for ziggystarman
0
2K

The End.