51,593 Topics

Member Avatar for
Member Avatar for mr. President

Hey guys: Can anyone please help me. I am having problems with this program and nned help understanding this. here is the code and the problem. Thanks. =========Mr. President============ Use a text editor such as Notepad to create a text file that contains several integers. The first integer in the …

Member Avatar for mr. President
0
136
Member Avatar for djbsabkcb

Below is my Julian day program. I have to convert a day into julian and then get todays date and tell how many days from the julian date it is. I am having problems with the output of the julian date is off by 1 day and my difference output …

0
113
Member Avatar for ohnbabygal

hi im writin a simple GUI project usin C++ (Dialog). i have an input file with a list of foods. my goal is to display the list of foods in a ComboBox and then Add some new food and Delete some. But i just cant put the list to a …

Member Avatar for arunkg999
0
218
Member Avatar for cluna
Member Avatar for chiwawa10
0
188
Member Avatar for bandm

I wrote a simple program to print out Testscore in Visual Studio .Net 2003 and got the following messages when trying to run it. 'TestScore.exe': Loaded 'D:\Documents and Settings\pooleb\My Documents\Visual Studio Projects\TestScore\Debug\TestScore.exe', Symbols loaded. 'TestScore.exe': Loaded 'D:\WINDOWS\system32\ntdll.dll', No symbols loaded. 'TestScore.exe': Loaded 'D:\WINDOWS\system32\kernel32.dll', No symbols loaded. The program '[3920] TestScore.exe: …

Member Avatar for bandm
0
199
Member Avatar for bluegirl

Hi, i need help creating a copy constructor. i have a class called CElist (and another called CEmployee) and it contains methods like this one: bool CElist::getFirst(CEmployee& e) { //do some stuff //sets e to the first employee and returns true //returns false if it cant } my problem is …

Member Avatar for Narue
1
214
Member Avatar for durga prasad d

Hi all, What is vtable ? How many vtables created for this sample. class A { virtual void myFunc() = 0; }; class B : public A { virtual void myFunc() = 0; }; class C: pulibc B { void myFunc() { cout <<"MyFunc"<<endl; } }; void main(void) { C …

Member Avatar for Narue
0
94
Member Avatar for CrazyDieter

In order to provide a simple "garbage collector" for my programs, I'm trying to write a template smart-pointer class, that may be used like that : [code] #include <ref.h> class Foobar{ ....}; ref<Foobar> sample_manipulation(ref<Foobar> in) { ref<Foobar> f=in; //.... return f; } int main(void) { ref<Foobar> f1=new Foobar; ref<Foobar> f2; …

Member Avatar for CrazyDieter
0
182
Member Avatar for drp

Hi, I've made a web application, and now I want to be able to distribute it with a copy of MSDE SP4. MSDE has to be installed via command line, and the web application takes a certain database setup. I've got all the scripts and commands ready to install the …

Member Avatar for drp
0
185
Member Avatar for JoBe

Hello ladies and gents, I had to do an exercise in wich I was required to compair two standaardtype strings opposits, meaning: name = "Johan", name2 = "nahoJ" The idea was to return a bool value True or False. I did this with the following code I wrote:[code]#include <iostream> #include …

Member Avatar for Dave Sinkula
0
253
Member Avatar for jazzyjoe

Hello I am new to C++, I have this program which i take an input file and i have to find the average and standard deviation of the numbers in the file. I have part of the program completed but i don't know where to go from there. can someone …

Member Avatar for murschech
0
147
Member Avatar for DotNetUser

txtULCol->Text == "" does not work for checking for a blank textbox in VC++ .NET. With or without text the code always return false. Any suggestions? Thanks.

Member Avatar for alpha_foobar
0
158
Member Avatar for papouAlain

My software (C# Winform) need to connect to a website to download a file. The file is sought on the website with the login and password, then given to the client to download. If I try with the browser, the website gimme a page with the password and the login …

0
76
Member Avatar for shakoush2001

Hi Iam using Borland Builder 5, and Ive got 10 TImages called Image1, Image2....Image10. I want to add these images to an array of type TImage can I do that in a for loop or do i have to add each Image by itself. //this is the method Iam using …

Member Avatar for Rashakil Fol
0
173
Member Avatar for Stanislaw

Is it possible to create a variable within a program (while its running). The problem I am trying to Solve: In school I created a cashmachine emulator. The thought then dawned on me, what If I wanted different user abilities within my cash machine program (Ie. only the manager would …

Member Avatar for tonakai
0
372
Member Avatar for cymerman

I am doing this program that has a menu of 8 items The error is: --------------------Configuration: aaaaa - Win32 Debug-------------------- Compiling... aaaaa.cpp c:\temp\test\test1\aaaaa.cpp(125) : error C2374: 'x' : redefinition; multiple initialization c:\temp\test\test1\aaaaa.cpp(120) : see declaration of 'x' Error executing cl.exe. aaaaa.exe - 1 error(s), 0 warning(s) Does anyone know where …

Member Avatar for cymerman
0
254
Member Avatar for BioTechNoob

Hi all, My first, but likely not my last post. I’m teaching myself C++ with basically no programming background. I’ve been using Borland, reading books (such as teach yourself in 21 days, etc.) and reading this website, but now I’ve run into a problem and after three days of trying …

Member Avatar for zyruz
0
132
Member Avatar for JoBe

Hello ladies and gents, Came across a program example in wich you are able to sort program-parameters in alphabetical order. The code is this:[code] #include <iostream> #include <string> using namespace std; void sort2(char* &p, char* &q) { if(strcmp(p, q)> 0) { char *h; h = p; p = q; q …

Member Avatar for JoBe
0
371
Member Avatar for jakejacobson

[COLOR=Blue]I have the following code to initilize struct booknode in a link list.[/COLOR] [code] // Here is how I defined booknode typedef struct booknode { char *title; // char[], holds book title char *author; // char[], holds book author char *isbn; // char[], holds book isbn float price; // float, …

Member Avatar for Rashakil Fol
0
342
Member Avatar for mina1984

Hi, im lost and i need help writing a function gcd that returns the greatest common divisor of two integers and has to allow five sets of numbers to be input by the user. this is what i have so far where i put /* is where i need help …

Member Avatar for mina1984
0
392
Member Avatar for M Tritt

I'm building a tic tac toe game with a variable board size using class GameBoard and class GamePiece. The GamePieces have a char array, pName, for the player's name and a char pType for the piece (X or O). the board is set up using a pointer to an array …

Member Avatar for Narue
0
275
Member Avatar for M Tritt

I have a pointer called **pieces that points to an array of class type GamePieces that contain members pName and pType. I am trying store values in pieces[row][col].pType and then print the pieces in a matrix. My program crashes on this line of code: [code] while (pieces[row][col].pType == 'X' || …

Member Avatar for Narue
0
112
Member Avatar for somer2412

Can someone please help? My assignment is to display a chart using loops, not allowed to hard code any numeric values below the headings. The user is given three options if someone could help me get started with the first chart, I can get the rest. I have included my …

Member Avatar for zyruz
0
141
Member Avatar for cpp noob

i have jut started learning cpp need help : is their any way i can make a char statement conatining spaces too. if yes plz tell me. :rolleyes:

Member Avatar for cpp noob
0
306
Member Avatar for shakoush2001

Hi guys, I working on a chess program and Iam now inserting the images for each stone to the form, the problem Iam facing is that I want the Image only to occupy the area of its perimeter without the white (or otherwise) background that accompanies the square area which …

Member Avatar for Narue
0
196
Member Avatar for djbsabkcb

Need help with the C++ programming. I am trying to compute the count of values, the average, and the standard deviation of the input given by user. My output is correct except for the standard deviation. My code is below: Thanks [code]#include <iostream> #include <string> #include <cmath> using namespace std; …

Member Avatar for djbsabkcb
1
504
Member Avatar for djbsabkcb

Below is my code for a class car efficiency program but I have some errors with the get_gas function. if you can help would appreciate it. [code] #include <iostream> #include <cmath> #include <cstdlib> using namespace std; class Car { public: Car(); Car(double); ~Car(); void add_gas(double); double get_gas(double); void drive(double); private: …

Member Avatar for djbsabkcb
0
169
Member Avatar for Charliebot

Hi, I'm very new to programming. I have Visual C++.net and I want to know how to create a program in C. The software is automatically adding the .cpp extention to all of my projects, but I want files with the .c extension. Thanks :eek:

Member Avatar for Narue
0
115
Member Avatar for bandm

Hello All, I posted this over in the Software Forum, but I realized that maybe it belongs over here. I have both VS 6.0 and VS .Net 2003 available to me. I am just starting to learn programming and wanted to know the difference and which one would be the …

Member Avatar for Narue
0
207
Member Avatar for cpp noob

this program contains everything even leap year: :idea: i am a beginner in cpp (we have this in school so i am learning this age 15 ) [code]# include<iostream.h> # include<conio.h> void main (void) { clrscr(); int years1, months1, days1; int monthdays1[12] = {31, 59, 90, 120, 151, 181, 212, …

Member Avatar for cpp noob
0
139
Member Avatar for M Tritt

Can anyone lead me in the right direction to get this to work??? my << overload compiles fine... ofstream& operator<<(ofstream& ofs, const GameBoard& b) //overloaded ofstream operator to save board & piece { for (int row=0; row < b.size; row++) { for (int col; col < b.size; col++) { ofs …

Member Avatar for M Tritt
0
131
Member Avatar for shakoush2001

hi there this is my first time I post here, Ive taken some courses in C++ and Iam on my own now, but there are still alot of basic issues I need to work on so please do not mind the following question: Iam working on a chess interface and …

0
64
Member Avatar for shahid

Write a C++ program that has class 1) math Math class has only one data member number and member function display that will display the data member number. Write the constructor of your math class that will initialize the data member number with the value zero. Program will overload the …

Member Avatar for alc6379
0
151
Member Avatar for DotNetUser

I'm using VC++.NET and drag a couple controls onto the form. When I edited the auto-generated code for a control in InitializeComponent(), the controls on the form disappears. When I tried to add them back, it complained that it's already there. Eventhough the form no longer has the controls, it …

0
52
Member Avatar for murschech

Attached is a tiny program in which the function F has as an argument the function pointer double (*f) (double). F returns the sum f(1)+f(2)+f(3)+f(4). (Naturally, I have a much more interesting application in mind, but this simple example makes the point.) What I really want to do is replace …

Member Avatar for Dave Sinkula
0
219
Member Avatar for renork

Ok so Im working on my last lab for class and I decided to try to do it in object oriented since thats what my next class is pretty much all about. Never hurts to get a head start. However Im having difficulty figuring it out from the book. Can …

0
80
Member Avatar for JoBe

Hello ladies and gents, Ive been reading about how when a class becomes to big due to to many memberfunctions, it is best to split the program up into several sections wich could be something like this: Interface section Implemenation section Application section I was given an example wich is …

Member Avatar for JoBe
0
495
Member Avatar for Jay J

Please see this question topic: [url]http://www.daniweb.com/techtalkforums/thread27020.html[/url]

Member Avatar for Catweazle
0
77
Member Avatar for Jay J

I need to be able to use system functions on turbo c++ 3.0 on windows XP. I require this for my school project and I am restricted to this particular compiler and OS (modern OS and old compiler..i love my school :confused: ). Is there anyway in which in i …

0
295
Member Avatar for DotNetUser

I'm new to Visual Studio .NET. I thought C#.NET replaces VC++ 6.0 until I saw that C++.NET was still around. So, what's the difference between the two? I want to create a GUI that uses some C++ header/source files and a C++ socket library. Which would I use? I have …

Member Avatar for darklordsatan
0
233
Member Avatar for M Tritt

I'm trying to compile the following class code and keep getting errors on the overload functions. Everything else compiles ok. I've looked at several sources and compared the syntax and I don't see where the problem is. Please help??? header file [code] #ifndef GAMEPIECE_H #define GAMEPIECE_H #include <iostream> #include <cctype> …

Member Avatar for Dave Sinkula
0
238
Member Avatar for winbatch

Hopefully I can ask this clearly. Basically I'm wondering if I have a structure like so: struct MyStruct { char fieldA[20]; char anotherField[15]; int andAnother; char lastField[30]; }; Is there a way to dynamically print out it's contents? [fieldA] = "ABCDE" [anotherField] = "TEST" [andAnother] = 5 [lastField] = "WHATEVER" …

Member Avatar for Rashakil Fol
0
111
Member Avatar for M Tritt

I'm trying to put together a tic tac toe game for a c++ class. Requirements are that it have two classes - gameboard and gamepiece. The gameboard I've pretty much taken care of, but I'm confused on how to set up the gamepiece class. Here's the requirements as given to …

Member Avatar for M Tritt
0
1K
Member Avatar for freemind

Hello everybody! I'm quite new to C++ and as exercise I had to write a simple program, trying to duplicate the strcpy(), strlen() and strcmp() functions in C++. The code seems to be ok from syntax point of view but the results are quite unsatisfying :o. If anyone could point …

Member Avatar for freemind
0
104
Member Avatar for EricaJanine

Hi everyone, Just wondering if anyone is interesting in starting a new forum for using ACE? I am new to both ACE and network programming using C++. Thanks! ej

Member Avatar for alloy_zeus
0
271
Member Avatar for somer2412

I know this is very simple but I cannot remember how to underline a string in C++. Can someone please help.

Member Avatar for robgxxx
0
125
Member Avatar for JSThePatriot

Okay I use Dev-C++ as my IDE. I have never linked my own files. I am pretty much a noob on C++, but not to programming in general. My issue that I have been almost pulling my hair out with is this. I am using a premade MD5 header file …

Member Avatar for oboler
0
150
Member Avatar for akshayabc

I have 2 problems in C regarding floating point, please help : Q1 Output of the following code- C. [CODE] main() { float a=0.7; if(a<0.7) printf("C"); else printf("C++); } [/CODE] But if we change the if condition from a<0.7 to a<0.7f we get output- C++. Q2 The following code gives …

Member Avatar for akshayabc
0
141
Member Avatar for mav1

I am having a little trouble with my program assignment. I don't want the answer I just need pointed in the wrtie direction. I cannot get my program to loop. The program prompts user to enter hours worked and calculates and displays. The it asks the user to enter y …

Member Avatar for varunpuri
0
178
Member Avatar for JoBe

Hello ladies and gents, Ive been reading about when you have a very large program, that it is advisable to divide this into several modules. Ive tried this out with an example of two separate modules that where given as examples and managed to get two .cpp modules into the …

Member Avatar for JoBe
0
240

The End.