64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for madt

i have the following for my operator overload [code]fraction fraction::operator+(const fraction& object)const { fraction temp; temp.a = a*object.b + b*object.a; temp.b = b * object.b; return temp; } fraction fraction::operator-(const fraction& object) const { fraction temp; temp.a = a*object.b - b*object.a; temp.b = b * object.b; return temp; } fraction …

Member Avatar for Dave Sinkula
0
260
Member Avatar for ruwach

Hey there, i need some help with a simple cgi script. i cannot get it to write output to a file. here is the script. [CODE] #!/usr/bin/python import cgi form = cgi.FieldStorage() Customer = form['Customer'].value Field = form['Field'].value data = [Customer, Field] reshtml = """Content-Type: text/html\n <html> <head><title>Customer Data</title></head> <body> …

Member Avatar for ruwach
0
238
Member Avatar for hazzo

My Program : [code]#include <iostream> #include <string> using namespace std; void Reverse(string &InputString); void CharSwap(char& First, char& Second); void main(void) { string InputString; cout << "Please enter the string to reverse ==> "; getline(cin, InputString); cout << endl << "You entered the (" << InputString.length() << ") char long string: …

Member Avatar for vegaseat
0
127
Member Avatar for grc1uk

Hello I have not had much programming experience especially with VBS. I have been asked to write a script which checks what AD group a user is in and then runs a specific drive mappings for that group and user, also i need the script to check the date. This …

Member Avatar for grc1uk
0
444
Member Avatar for C. Raghuraja

In my project I am using vb6 and Oracle as backend. I am using Combo box and Item data (Name as display and id in itemdata) Now I am faceing problem. The Master records has grown 10,000 records. When I populating records from recordset it needs more than 1 to …

Member Avatar for Comatose
0
118
Member Avatar for indianscorpion2

hi i am a student of computer science.i am learning the c programming language.we spend all our time writing programs which tells itself a secret like adding numbers,kid stuff etc. i want to know the real thing.can anyone tell me what are the real time applications of C.?

Member Avatar for letmec
0
184
Member Avatar for mrmike

Just got a quick question I know how to assign arrays using the DIM command, but I want to give the array a set of constant figures that will never change Under Delphi I would use the following when declaring the array at startup var myarray :array[0..8] of integer = …

Member Avatar for mrmike
0
2K
Member Avatar for Prahaai

Anyone knows what are percents... Some event has some chances to happen. From 0 to 100... if the percent is 0 it means zero chances to happen. 100 means it will happen every time. 50 statistically means it will happen half of times... But HOW can someone give x/100 chances …

Member Avatar for Dave Sinkula
0
268
Member Avatar for madt

I have the following assignment due: Design a class -say, fraction - that performs the arithmetic and relational operations on fractions. Overload the arithmetic and relational operators so that the appropriate symbols can be used to perform the operation. Also, overload the stream insertion and stream extraction operators for easy …

Member Avatar for Dave Sinkula
0
273
Member Avatar for koolhead17

HEY EVERYONE THERE I WUD LIKE U TO TELL THT FUTURE IS "python" everythin is "python" atleast 4 those who hates writin in creepin c,c++ programmin languare which is error prone

Member Avatar for vegaseat
0
156
Member Avatar for missdiva
Member Avatar for usausa

I am trying to search for files in Directories. like, i have 10 directories..... and consider directory 1, which has 2 files.. this is same with all the files... i want to get a string from each of these files from 10 directories... to be written to a seperate file, …

Member Avatar for vegaseat
0
460
Member Avatar for Prahaai

I have this game skeleton. Now, as you can see, it is working, but when i choose something first time, i have to type it TWICE to make it work. It doesn't matter if i choose Status, Score, or Battle, or Flee, the result is the same: i have to …

Member Avatar for Prahaai
0
177
Member Avatar for dejaz

hi guys, i am stuck... we have to show wats in a file.... then at the end show the grand total of the Profits .. heres the report func.... [code]void report() { struct Prods ssg; double prof; FILE *f; f = fopen("data.dat","rb"); printf("\n\n\n==============================================================================\n"); printf("Prod# Type Description Qty Cost Price Profit\n"); …

Member Avatar for dejaz
0
251
Member Avatar for Tetsu

I'm running into to this problem where the fstream is suppose to read data off a file to store in arrays. I cant continue with my project until the program reads it right. It is skipping some of the datas. Can I get a little help? Thanks in advance [CODE] …

Member Avatar for Tetsu
0
472
Member Avatar for sinrtb

HAving trouble with my pointer arithmetic, any ideas appreciated My orgional code [code] Activity p[51]; for ( int i = 1; i <= n; ++i ) { // Read the activity records. pert >> p[i].i >> p[i].j >> p[i].pt >> p[i].prt >> p[i].ot; pert.getline(p[i].desc,21); [/code] converted but wrong [code] Activity …

Member Avatar for Dogtree
0
456
Member Avatar for M.Rodz

[COLOR=Blue][FONT=Arial Narrow]Hi. I am a begginer :cheesy: on the programming area and I am currently taking a course on C++. I have doubts :o about how to use the strchr function. Can somebody give me some hints? :?: Thanks.[/FONT][/COLOR]

Member Avatar for vegaseat
0
194
Member Avatar for nathanj99

Hi Im using C++ builder 6 and need to print off some text. The text will be in the form of strings. I guess I need to use TPrinter. Can someone point me in the right direction on how to print stuff out from C++. I need to be able …

Member Avatar for vegaseat
0
180
Member Avatar for vhinehds

Hi to everyone... Just for clarification and added information...can someone please explain deeper what are VB RUNTIME Files and its use or benefit if i dont have VB software. Your response would most likely help me before i start programming in VB, thanks a lot.

Member Avatar for vhinehds
0
379
Member Avatar for Wenshere

I would like to design a program to implement a string of operation, such as: 1+3/4+5*5-(454*23-34) Then, it returns a correct answer. And what's the exact algorithms?

Member Avatar for vegaseat
0
110
Member Avatar for krayek

Hello, I am new here looking for some advice. I belong to a programming group that intends to simulate hearing loss via software that we are creating. At the moment, we are looking to see how are we able to obtain sound from sound cards. What we intend to do …

Member Avatar for vegaseat
0
111
Member Avatar for Scuuba

Please help, I am writing a program to take in 3 values and return the shape of a triangle. The program runs, but not quite right. Instead of returning the shape of a triangle, it returns a smiley face....which really surprised me. Can anybody help? The code I have is: …

Member Avatar for Scuuba
0
209
Member Avatar for Acidburn

[code] int hangman::checkstatus() { for ( int i = 0; i < 5; i++ ) { if (encryption[i] == '*' ) { return i; cout << i; break; } } if ( i == 4 ) { cout<<"You win!"<<endl; } return 0; } [/code] Hello guys, this function always returns …

Member Avatar for Dave Sinkula
0
185
Member Avatar for warriorwarren

Hi, I have the following interface for a 35 day month calander script that I am writing. The interface is called for use with an html page. I am supposed to collect user input which includes day, month and their event. blankEventsJan = [ ['<br>','<br>','<br>','<br>','<br>','<br>','<br>'], ['<br>','<br>','<br>','<br>','<br>','<br>','<br>'], ['<br>','<br>','<br>','<br>','<br>','<br>','<br>'], ['<br>','<br>','<br>','<br>','<br>','<br>','<br>'], ['<br>','<br>','<br>','<br>','<br>','<br>','<br>'] ] …

Member Avatar for vegaseat
0
347
Member Avatar for bobr_1013

When this program runs, I can enter in the name the first time through the while loop (using "cin.getline). When I go through the second time, it skips the name and asks to enter the ss#. The first time through, everything works fine. [code] #include <iomanip> #include <iostream> #include <fstream> …

Member Avatar for vegaseat
0
232
Member Avatar for vipula

Hello Experts !!! I have two databases to select from my web page. In this script i can search one database(if ($choice=="staff publication") it works. I dont know how to write the script if I select the other option if($choice=="books"). Please can any one help me. I want to display …

Member Avatar for vipula
0
211
Member Avatar for javalsu

I'm having trouble setting the paper size and the paper bin in the printer object. I've tried the following code. If cboPaperSize.ListIndex = 0 Then Printer.PaperSize = 1 Else Printer.PaperSize = 5 End If If cboPaperSource.ListIndex = 0 Then Printer.PaperBin = 7 Else Printer.PaperBin = 4 End If End If …

Member Avatar for javalsu
0
231
Member Avatar for purplegerbil

The application I am writing involves creating a dos batch file and executing it using the 'Shell' command. The batch file is used to zip up multiple files. The zip file that is created is them emailed. :?: My problem is - creating a pause within the application so the …

Member Avatar for Comatose
0
196
Member Avatar for feda

Greeting , it will be helpful if any one can provide me with Round Robin algorithm code in c/c++ thanks in-advance

Member Avatar for Narue
0
194
Member Avatar for mneaker

I have a program due and I cannot figure it out! I have read about 30 tutorials to no avail! I need to have data read into python from an input file. The data is suppossed to be info from a pretend university that only has 10 students. Once I …

Member Avatar for mneaker
0
656
Member Avatar for Tyreses

Private Sub connect_Click() Winsock.RemoteHost = ipadd Winsock.RemotePort = 10101 Winsock.connect End Sub I'm pertty sure the problem is on line two the ipadd if thats supposed to be ipadd or if its supposed ot have something else added.

Member Avatar for Comatose
0
333
Member Avatar for AhmedHan

I want to change cursor position in my C++ program. As you know, C++ does not have any command to do this. By I think, one of the h files can be used for this purpose. My Bloodshed compiler has lots of "*.h" files. But I don't know how to …

Member Avatar for Dave Sinkula
0
4K
Member Avatar for WhataNerd

I didn't know which thread to post this question in so i just chose the visual basic one(random). My question is what do you guys recommend as a first programming language to learn for a highschool student interested in game programming....i'm sure there are a few that would do fine, …

Member Avatar for Iron_Cross
0
457
Member Avatar for Ghost

Hi, I was wondering if there is a way to control hardware in C++, such as opening and closing a CD drive. Thanks in advanced, C++

Member Avatar for Ghost
0
820
Member Avatar for bluegoo06

I got most of this too work, i talked to my teacher and he gave me some hints but i cannot get it full. The idea is to get the program to count specifically how many "a"'s there continueing through all the 26 letters. I cannot figure out exactly out …

Member Avatar for Dave Sinkula
0
175
Member Avatar for ikanku15

my programme has the strcmp. but i dont understand what it is use for. while((strcmp(current->bed_num,beddelete))!=0) bed_num and beddelete i have declared as an integer variables. when i run the programme, it stated that invalid conversation from 'int' to 'const char*' what does it mean?? thank you

Member Avatar for Narue
0
225
Member Avatar for sooim3

Hello, I've been trying to find something about why window.opener doesn't work for IE (I'm using 6.0) when I use the window.opener in a separate JavaScript file. It works without any problem when I use Mozilla/Netscape, but not for IE. The implementations I've seen in my searching for an answer …

Member Avatar for manou
0
854
Member Avatar for OverDoser

Hey is this field a good field to study in college if you want to learn programming and all of that happy stuff?

Member Avatar for OverDoser
0
139
Member Avatar for jeymine

Hi guys, I am working on a project on playing cards using enum and class. I really need help with the function defination in this project, Here i will attach the question, your help will be highly appreciated. You can get bac to me trough jeymineb at yahoo.co.uk. Thanks. If …

Member Avatar for marinme
0
2K
Member Avatar for Fasola

I HAVE SPECIFIC QUESTIONS!!! 1. Why do you need [b]Self-Referential Classes?[/b] Please provide a "real" life example of when it would be used. [code]class Node { public: Node(int); void setData(int); int getData() const; void setNextPtr( const Node *); const Node *getNextPtr() const; private: int data; Node *nextPtr; };[/code] 2. ^^^What …

Member Avatar for Fasola
1
960
Member Avatar for mikecoyner

i teach a high school c++ course. i would like to use a window for user interface instead of dos console. could anyone provide me the basic code to display "hello world" in a window? and if possible a link to the code necessary to use window api for c++ …

Member Avatar for Narue
0
212
Member Avatar for s-sriram

Hi I am trying my first try at Python. I want to do something very similar to what sprintf does with C. I want to concatenate a string with a number and store it into a new string. I wrote a snippet like this username='user' for i in range (1-100) …

Member Avatar for s-sriram
0
334
Member Avatar for DanceInstructor

DaveSW I hope you will help me :) At this [URL=http://www.AgentsWarZone.com/forum/home.php]site[/URL]. There is a vertical menu on the left side of the page. It uses some javascript for styling and animation. It works fine and looks good in firefox, but in IE as you hover over the different menu options …

Member Avatar for DaveSW
0
214
Member Avatar for nizar4445

Please could you give me an example of sorting an array and[B] how to call the [/B] [B]function at the main [/B] thanks a lot :o :rolleyes: :rolleyes:

Member Avatar for vegaseat
0
219
Member Avatar for cblue

Can anyone give me an idea how to convert an int or decimal number into hexadecimal? I know how to do it for binary by dividing by 2 and using the modulus % operator, but how do you take into account a b c d e f if the integer …

Member Avatar for Narue
0
159
Member Avatar for bobr_1013

The problem I'm having is this: I have a table [MAX_ELEMENTS] [18] where the MAX elements can be as high as 100,000. The length of each element is 18 characters. What I doing is simply loading in full 18 character records into this table. The problem I'm having is that …

Member Avatar for bobr_1013
0
159
Member Avatar for dallin

when using #include <iomanip> ; what is the syntax for formating numerical values for currency - example 123456, format to $123,456. Using the cout << command.

Member Avatar for dallin
0
171
Member Avatar for Acidburn

hello, I kep getting : [quote] C:\computer science programming\excerise sheet 6\cheque account\3 - Bank.cpp(100) : error C2614: 'cheque' : illegal member initialization: 'Balance' is not a base or member Error executing cl.exe.[/quote] [php] #include <iostream> using namespace std; class BankAccount { public: //void setAccount(int num, double amount); taken out replaced …

Member Avatar for Acidburn
0
145
Member Avatar for mikecoyner

whenever i use cin.get in a loop it skips over the first cin.get. for example, in the code below, the programs skips over the cin.get for the stu.name?? [code]#include<iostream.h> #include<fstream.h> struct student { char name[20]; char ssn[20]; char dob[20]; float gpa; }; main() { student stu; ofstream outfile; char choice; …

Member Avatar for mikecoyner
0
258
Member Avatar for JoBe

Hi ladies and gents, I wanted to start a new exercise, but after reading it several times, I actually don't know what the exercise is all about :!: The translation into English is this: [quote]Write a function wich can be declarered as the following: unsigned int datecode(int year, int month, …

Member Avatar for Narue
0
403

The End.