49,761 Topics

Member Avatar for
Member Avatar for dub4theworld

I am attempting to write a program that simulates a lobby or a line in which a "player" can get into in the form of a heap. The program does everything it is supposed to except when you try to add a second object("player") to the heap it won't do …

Member Avatar for dub4theworld
1
84
Member Avatar for pbt

I have only few days to submit the project of c++ on the topic "Wordprocessor" using dev C++ IDE and gcc windows version compiler. Most of time, i had spent for reading tutorials on wx-widgets. But, now neither i could go on to complete the tutorial nor i have started …

Member Avatar for ithelp
-2
103
Member Avatar for Stefano Mtangoo

What is ctypes data for BOOL? I mean in C++ to ctypes we have: int--> c_int float--> c_float what about BOOL?

Member Avatar for pmf
0
840
Member Avatar for crazyboy

Hello friends ........ it's ma first post. As i know, constructors are called at the time of object creation. But if i want to call it explicitly, not at time of object creation, can i do this? if yes? then how? any help please?.........

Member Avatar for crazyboy
0
737
Member Avatar for 0o0

i'm working on a school assigment with Binary search trees im trying to find the localtion of the smallest key in the binary nodes so i created a function that retutns the point location to the smallest element key [CODE] template <typename DataType, class KeyType> BSTreeNode * BSTree<DataType, KeyType>::findMin (BSTreeNode …

Member Avatar for Laiq Ahmed
0
198
Member Avatar for AssaultM16

So here is how the program should work: It should accept a string in which there is a full operation (ex. 23 + 34) it should split the string into three parts. The first and the third part should be the numbers and the second should be the operation sign. …

Member Avatar for AssaultM16
0
98
Member Avatar for lancevo3

I am writing a function that inserts an item into the rear of the queue. [code=cplusplus] template <class T> void Queue<T>::pushBack(const T& item) { QNode<T>* newNode; newNode = new QNode<T>[item]; if (empty()) qFront = newNode; else qRear->next = newNode; qRear = newNode; qSize++; } [/code] It seems like line five …

Member Avatar for lancevo3
0
101
Member Avatar for b89smith

I am using Dev-C++ in Windows. When given a file's url I want to be able to download it to a variable and then pull data out of the file using string manipulation and use it in my application. I have search Google and I have not found any good …

Member Avatar for Ancient Dragon
0
110
Member Avatar for XodoX

I am trying to answer some practice questions, but I really don't know what to to with the following questions. > Given the following class definitions, identify the type of class relation > ship and determine both the superclass and sublcass. class Shape {} ; class Triangle: public Shape {} …

Member Avatar for Ancient Dragon
0
80
Member Avatar for jake43

I don't understand why this program will not compile please help. This is what the program supposed to do. After the correct number is guessed or all five guesses are used and the correct number is not guessed, the user will see a message that shows the secret number and …

Member Avatar for SeeTheLite
0
97
Member Avatar for kz07

how can i modify my code so it can handle upper and lower case characters.. for this: cout << "(B)uy, (S)ell, (H)old or (Q)uit: "; cin >> ans; what should i add to the code? i added #include <cctype>.

Member Avatar for SeeTheLite
0
108
Member Avatar for spursfc

Hi, I wrote a program to read from one file and then process data and out put to another file, it all works okay but what I am wondering is that my source file will have a different name all the time, but it will always be the same file …

Member Avatar for SeeTheLite
0
89
Member Avatar for huzeifa

Yo guys plz can anyone teach me how to disable a button without using MFC. It would be great for the help

Member Avatar for marco93
0
94
Member Avatar for Mnkyman1030

Hi, I'm having trouble with a program that I have to write that is supposed to convert a prefix expression to a postfix expression using stacks. The program I wrote seems to compile fine but when I run it, it gives me a fatal error and aborts the program. I'm …

Member Avatar for Mnkyman1030
0
1K
Member Avatar for gangsta gama

Hello all, I have been programing for a year or two and i dont get vectors. I have seen them with numbers but can someone give me an example of vector.erase with letters? like for an RPG: like sword, axe, armor. Then have them chose what they want to be …

Member Avatar for Nick Evan
0
134
Member Avatar for avaitla

Hey. Can someone help me with this parsing function? I'm not sure why it won't work. Whenever I test it with a valid input and output file it simply crashes. [code] void parse(string infilename,string outfilename) { string temp; ifstream infile(infilename.c_str()); ofstream outfile(outfilename.c_str(), ofstream::app); if(!infile) { cerr<<"Infile Not Working!"; } if(!outfile) …

Member Avatar for avaitla
0
90
Member Avatar for poncho4all

Ok well i need help with my code, the idea is to make something like a DOS Console, the trick is we are not alowed to use dos functions. Well this is what i have so far [code] #include <stdio.h> #include <iostream.h> #include <conio.h> #include <string.h> #include <dir.h> #include <dos.h> …

Member Avatar for iamthwee
0
182
Member Avatar for anuizath2007

my homework is to make a c program displayin de cosine series.....i made up one referrin buks but can it be made simpler or somethin using while statements.......... [code=cplusplus] #include<iostream.h> #include<conio.h> #include<math.h> int fact(int);//Global defenition void main() { //cos(x) //to find the power pow(number,power); //to find root sqrt(number)-- in math.h …

Member Avatar for wildgoose
-1
135
Member Avatar for br99

I'm trying to write a GUI program where I want to use both strings and vectors, but the computer won't recognize them no matter where I try to include <string> and <vector>. Can you tell me where in the code I need to put my includes and my std namespace?

Member Avatar for br99
0
551
Member Avatar for kernel>panic

I made this program that should be very easy but it does not work. When I try to run it, it should take the price and add tax to it but it comes up with a crazy decimal number like: 7.74335e+268. What should I do I tried everything. I #include …

Member Avatar for JameB
0
138
Member Avatar for baula

Helo frndz, I'm a nob in c++....So, I want to know about default constructor. How to create? Why default constructor? How to create a no-arg constructor that creates a default triangle??...Plz help... Thnx...

Member Avatar for baula
0
92
Member Avatar for IFEEL

I know, I know, this seems like an uber beginners question and most likely is. I have had this error several times and always figured it out myself, but this time it won't. GetUserData() returns a void* [code] #ifndef BLABLA_H #define BLABLA_H #include "GameEntity.h" //class declaration left out for simplicity …

Member Avatar for IFEEL
0
94
Member Avatar for Slephnir

I am learning c++, below is an attempt at a simple XOR encryption program. I am am using Dev c++ (Blooodshed Ide) using the ming-gw win 32 gcc compiler blah blah. This code compiles without errors or warnings but it will not produce an 'exe' only a '.o' file, firstly …

Member Avatar for Salem
0
2K
Member Avatar for dannz89

Hello, I'm sure this is some complete beginner's 'gotcha' that I've forgotten all about but if anyone can give me a clue as to why my pointer seems to be going astray....? I'm new to C++, well, very old to C++ actually but have been programming JAVA for years and …

Member Avatar for dannz89
1
147
Member Avatar for atch

Hi, I just wonder if this is possible: (semi-pseudocode (won't work as planned)) ofstream fout("my_file.txt"); fout << cout; Looking forward to your reply

Member Avatar for Narue
0
127
Member Avatar for accy

The following is a class diagram for class textBook and the main() program. The class consists of 3 data members and 4 function members. Write a complete C++ program that is able to do the following tasks: textBook bookName : char[] bookPrice : float totalInStock : int Constructor orderBook(int):void checkQty() …

Member Avatar for kvprajapati
0
85
Member Avatar for red_dogexpress

i found this code online and im trying to get it to overwrite the original file instead of printing to screen but i have to admit its too advanced for me can anyone help please [code=cpp] #include <iostream> #include <fstream> #include <string> #include <vector> #include <iterator> using namespace std; int …

Member Avatar for kvprajapati
0
126
Member Avatar for shaneera

PLEASE EDIT this code if u can . this is my c++ Assgnment it is about reserving air tickets. if u can help me 2 insert delete & Edit a air ticket functions to the main menu please please please help me my friendz... I wz managed 2 save d …

Member Avatar for crunchie
0
190
Member Avatar for mcco1

I have a text file, for example: [code]This Is A Text File[/code] This file is on some host. Now I want to get the file to my program, my problem here is, that I found how to save the file(download) but that's not what I need.. I need it to …

Member Avatar for zautner
0
120
Member Avatar for selsium

hi folks, I have some 247 warnigs are same type warning C4996: 'fopen' was declared deprecated I am using makefile to compile my cpp program in Visual studio 2005. I have added _CRT_SECURE_NO_DEPRECATE in preprocessor definition too. but still I do get the warnings . Could anyone help me?

Member Avatar for selsium
0
2K

The End.