64,152 Solved Topics
Remove Filter ![]() | |
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 … | |
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> … | |
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: … | |
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 … | |
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 … | |
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.? | |
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 = … | |
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 … | |
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 … | |
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 | |
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, … | |
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 … | |
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"); … | |
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] … | |
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 … | |
[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] | |
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 … | |
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. | |
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? | |
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 … | |
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: … | |
[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 … | |
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>'] ] … | |
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> … | |
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 … | |
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 … | |
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 … | |
Greeting , it will be helpful if any one can provide me with Round Robin algorithm code in c/c++ thanks in-advance | |
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 … | |
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. | |
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 … | |
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, … | |
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++ | |
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 … | |
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 | |
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 … | |
Hey is this field a good field to study in college if you want to learn programming and all of that happy stuff? | |
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 … | |
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 … | |
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++ … | |
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) … | |
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 … | |
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: | |
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 … | |
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 … | |
when using #include <iomanip> ; what is the syntax for formating numerical values for currency - example 123456, format to $123,456. Using the cout << command. | |
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 … | |
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; … | |
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, … |
The End.