51,593 Topics

Member Avatar for
Member Avatar for cog_bn

Hi, Some time ago, I wrote a program that used the write() function of an fstream object to write a large file to a 100MB-zip-disk (it was an old computer). When I "End Now"ed the program I found that the zip disk was corrupted. The file didn't show up but …

Member Avatar for cog_bn
0
351
Member Avatar for inanc

hello friends, I have two program: receive.cpp and send.cpp They re very simple, when compiling there is no error in both. I only wanna see them to talk to each other but when run these progs, both of them gives 10061 error. Below the codes, firstly receive.cpp: [code] //******************* SERVER …

Member Avatar for serup
0
318
Member Avatar for Anon17

Hi there. I have an encryption method which handles a string char by char and converts it to base 32, then adds it onto the result string. However, it seems to completely replace the result string instead of adding onto the end of it. My code: [code] char *encrypt(std::string input, …

Member Avatar for Anon17
1
94
Member Avatar for wingers1290

Hi, i am using this code to show form2 in my program, [code] Form2 form = new Form2(); form.Show(); [/code] however when i want to use the on load event to change a labels name nothing happens, i suspect because it isnt loading just showing, does anyone have a solution …

Member Avatar for wingers1290
0
142
Member Avatar for jko2326

Hello everyone! I'm a beginner in programming so please bare with me =/ I have a problem that I just don't understand. Here's the problem: Write a program that uses a loop to display the characters for the ACSII codes 0 - 127. Display 16 characters on each line (c++). …

Member Avatar for VernonDozier
0
322
Member Avatar for _dragonwolf_

Ok, here is what I have for my compareDates() function in my class: [CODE] int Date::compareDates(int m, int d, int y) { if((month < m) || (day < d) || (year < y)) cout << "This date comes before previous valid date." << endl; else if((month == m) || (day …

Member Avatar for VernonDozier
0
114
Member Avatar for Creator07

Hello all, Note: This is a general question, and I did not find any other category in the forum to ask this question... Last year, I got a copy of VS 2008 (VC 9.0) as gift. I liked it a lot! I started developing some simple applications using C ( …

Member Avatar for Creator07
0
199
Member Avatar for harryhaaren

Hey all, I'm currently working on a design for my first "big" program. I've done a small Object Orientated IDE before, however that code there was a bit of a mess... So I'm scoping around for online tutorials on how to design an OO program. Does anybody have a great …

Member Avatar for harryhaaren
0
100
Member Avatar for _dragonwolf_

I feel like an idiot asking for help every step of the way. My program is almost complete. I just can't seem to wrap my head around the constructor issue. Here is the check list of what I have left: Appropriately use the Dates(int,int,int) & the Dates(string,int,int) constructors; Appropriately use …

Member Avatar for _dragonwolf_
0
107
Member Avatar for FireNet

[CODE] Creating Servers for handling Multiple clients Fog Edition By FireNet [/CODE] (This document is dedicated to my friend Aaron Anderson) (Fog Edition means I dont tell you everything stright.All the info will be there but you will have to do much thinking) Servers and Clients,the backbone of the internet …

Member Avatar for domenzup
0
7K
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
88
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
104
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
857
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
739
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
201
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
101
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
103
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
113
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
81
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
104
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
110
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
92
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
96
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
139
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
93
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
183
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
139
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
94
Member Avatar for swinefish

Hey all I've been developing in c# for a few months now, but to my shame have only recently started looking at threads. And now that I do look at them, I'm having issues... Here's a sample of my code: [code] private void cmdNext_Click(object sender, RoutedEventArgs e) { ... Thread …

Member Avatar for swinefish
0
133
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
98
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
150
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
138
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
86
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
129
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
199
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
123
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
Member Avatar for Divinginthesky

I am able to generate the output file but it does not execute. This is what I do: g++ program.cpp -o program then I can see the program as the output file but when I type program it says: It says bash: program: command not found. So, what am I …

Member Avatar for zautner
0
108
Member Avatar for _dragonwolf_

I am having to write a program that has a user-defined class. In this program I need to convert an INT to a STRING. For example, if the program reads in the date "7/17/2009" it will need to be converted to "July 17, 2009", where all it does is take …

Member Avatar for _dragonwolf_
0
166
Member Avatar for fuggles

What is the best way for me to send and int[999999] accross a socket? When I just plug in the pointer to the array I get this error: [icode]Error 1 error C2664: 'send' : cannot convert parameter 2 from 'int (*)[999999]' to 'const char *'[/icode]

Member Avatar for wildgoose
0
114
Member Avatar for kentigens

Hi, Im currently implimenting a nested for loop, but there seems to have some known bugs and i dont know whats causing it , how to fix it, etc. Heres part of my code: //using some of vector<structs> below: [code=c++] void Profile() { int wire = 1; int face = …

Member Avatar for VernonDozier
1
280
Member Avatar for dombit

ok, so i tried about everthing, to print the box charaters in a console window. but all i ever get is ? i am gusing the console font done not support these charicters. so is there a way to change the console font for my aplication throgh c++. i am …

Member Avatar for nmaillet
0
112
Member Avatar for DIDL

Hi im new in this program but i want to work with C++... i know the basic comands but i want to make the interface o litlle game.... but i dont understand how....

Member Avatar for JameB
0
74
Member Avatar for wingers1290

Hi, i am creating up to 10 textboxes using the following code: [code] if (textBoxIndex != 11) { TextBox field = new TextBox(); field.Name = "field" + textBoxIndex.ToString(); textBoxIndex++; field.Size = new Size(200, 20); panel1.Controls.Add(field); } else { MessageBox.Show("A Maximum of 10 Areas is Supported"); } [/code] What I need …

Member Avatar for ddanbe
0
283
Member Avatar for anonymous23

Can someone please give me some problems or activities using if, else/if, and nested if statements???? i need 5 for each.. it would be better if u give the c++ codes for each problem..:) this will be for my project.. hope u guyz helpme:icon_cheesygrin:

Member Avatar for wildgoose
0
88
Member Avatar for TheBeast32

Hi, I need a way to see if a mouse button is up or down, if the wheel is being used, and if so, which direction the wheel is moving using a hook or something like that. MSDN didn't help me much. Also, I'm using Dev-C++ 4.9.9.2.:yawn:

Member Avatar for nicsor
0
168

The End.