199,114 Archived Topics
Remove Filter ![]() | |
[code] #include <iostream> #include <cmath> using namespace std; int main() {//begin main double hypot(double,double); double base; double height; cout<<"Program to compute the Hypotenuse of a given right triangle. \n"<<endl; cout<<"Enter the base: \n"<< endl; cin>>base; cout<<"Enter the height: \n"<<endl; cin>>height; cout <<"The hypothenus of given triangle is " << hypot(base,height) … | |
need help with this assignment. im having trouble with if and else. I enter package A and then it ask me for the hours twice. just run it if you dont get me. here are a few examples of how running the program should look, please help me!:S example 1 … | |
At the moment I have a normal ajax example that refers to an xml file. This xml file is a conversion of a mysql database file I have. Now I wish to cut out the middle man (xml) and refer straight to the database. Any Ideas on how I would … | |
Hello all I'm having difficulty with a program I am writing to reverse the characters in a string. The string contains a sentence where i have to change a character...if it is lower case I have to change it to upper case and visa versa. And this has to be … | |
I have writen a program that includes ALOT of code. I update this code and work on it everyday, and with so many lines, I get confussed. a big chunk of my code goes like this: [code] cout << "\nNext:\n"; cin >> string2; if (string2 == "end") { cout<< "ok, … | |
hi all i have one employee table ..it contains 2 coloums like employee name and manager... every employee have manager ...that manager also one of the employee...some employee dosnt have manager on that table... i want to write the query who dosent have manager on that table? | |
I have made a data table and want to display its content on the crystal report viewer. My data table has 2 columns but the report only shows one column... <code> DataTable dtRecords; dtRecords = new DataTable("Records"); dtRecords.Columns.Add(new DataColumn("Name", typeof(string))); dtRecords.Columns.Add(new DataColumn("FullName", typeof(string))); dtRecords.Rows.Add("aslam", "zia"); dtRecords.Rows.Add("hamad", "anwar"); CrystalReport1 cr = … | |
can any one telll me the answer soon 1.i dint get clear idea about abstract class and interfaces in c#? when we go for abstract class and interface in c# .net? explain with coding example 2.explain about staic mathoda with example... 3.i have 1000 records in my database...want to dispaly … | |
What is the best way to kill a number of PIDs that I've isolated from an external file? So far I've done grep PID badPids | awk {'print$2}' to get the list of bad PIDS to kill. I've searched through the man pages to no avail and I need to … | |
Hello Friends, I'm facing a problem now that is i have some THAI language data in SQL Server 2000. The problem i don't know how to retrieve this data to variable and i don't noe the variable should be what data type? such as string or others? Have any one … | |
Problem: I need to read in each line of an input file into an aray of strings.The program should quick sort the array and output the sorted list to a file: I came out with the below code, buts its giving me two error and i need to update it … | |
I'm trying to create a tag like routine for music genres. I have an array with various music genres in it. Those genres appear in a select box so they can be added to a text area... The problem is, I want to be able to add multiple genres instead … | |
OK, just a quick question. What is a good sound library I can use to play files? On a slightly unrelated note, what is one I can use to generate sounds (tones, like 8 or 16 bit.)? I would very much prefer it to be open source and platform independent. … | |
Hello everyone, This is my first post, I'm having trouble on an assignment. I'm writing a function for a database program in class... I have to write the function that will tranverse a linked list, add a "node" and then write the user entered info into the "node". The first … | |
ok so i have been sitting here for over 2 hours trying to figure out what is wrong with my code and why i keep getting the same 2 error messages energy part 2.cpp(104) : error C2059: syntax error : ']' and energy part 2.cpp(105) : error C2447: '{' : … | |
hello, for one of my programs I need to acquire the decimal off of a number, for example, if a double has value of "123.45" I need an int to have the value "45". to do this, I have the following code [CODE] double value, tempValue; int decimalValue; value = … | |
How do I make a variable a random value between 1 and 10 each time the program loops? I want to have a "I'm thinking of a number between 1 and 10..." thing, and then you have to guess the number, but I don't want the number to be the … | |
Hi all, Does anyone know if it is possible to write a C++ macro, which will force the compiler to construct Pascal/custom style string constants during compilation? The basic idea is to avoid unnecessary run-time construction from C-style to custom-style string literals. For example, when evaluating the expression {String2 = … | |
I'm trying to find a good, easy to use GUI for an inventory in my game, all I really want them to be able to do is select items, maybe move them around into different slots, and be able to modify variables based on where things are moved. I plan … | |
Hi everyone, I am working on a checkbook balancer for school and my code looks like this: [B]def process(balance): trans_type= raw_input("Enter Deposit(d), withdrawal(w), print(p), or quit(q):") amount=input("Enter the amount:") if amount<0: print"You've entered an invalid number." if trans_type=="d": balance=int(balance)+int(amount) print"Your current balance is", balance elif trans_type=="w": balance=int(balance)-int(amount) print"Your current balance … | |
I have a program that asks for a knights coordinates and prints out all possible moves. That works. What doesn't work is if it is not a legal place for the knight (i.e. off the board) it prints an error but also prints coordinates for -1,-2. not sure why. Any … | |
hi guys, somebody help me please i need to know how to retain any input on page reload. I have 2 chained combo box (province and city) when a user choose a province, the next combobox should be populated. I use a script that reload the form to execute a … | |
I am new at java. I am making an address book program. Below is a code of the Search class. Could anyone please look into it? The program is giving a problem while runtime. [code] import java.io.*; import java.util.*; class search { private String str,sval; private String arr[]=new String[8]; char … | |
Is it possible to have a dynamic operator? I know I could parse it out and find the symbol just wondered if it was possible. [code] string aString = "5"; int a = 5; int b = 6; string op = "<"; //want to do something like dynamically without checking … | |
Hello friends, I am facing a linking problem in VC++8.0 compiler. Suppose I have a library, say A.dll. In this library I have a file, say x.cpp. Within this file there is a extern const variable, like [code] ..... __declspec( dllexport ) extern const long ERROR = 100; ..... [/code] … | |
I'm starting to learn c++. I use vista so lots of ide's dont work for me. Right now im trying visual c++ but things like cout are not understood when compiling. This may be a compiler issue. I all would like to know is a good basic (for beginers) ide … | |
I need help for my c# hw. I have no idea about it. It is due on Sun night. Money for helping me is negotiated. | |
ok, I have created a mobile application for a java enabled phone. I want to make the classic pong game with one paddle, and a number of blocks to break. I have managed to get the ball bouncing around the screen and off the block using a set of if … | |
Hey guys, I've an issue when it comes to multithreading i seem to get this error after updating a variable... [quote] Cross-thread operation not valid: Control 'progressBar1' accessed from a thread other than the thread it was created on. [/quote] Basically I'm trying to use a progress bar indicator to … | |
I am trying to make a simple engine with WinAPI and I encounter this problem: [code] class Window { .... public: [COLOR="Red"]static HINSTANCE hInst;[/COLOR] .... }; .... .... .... int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { MSG msg; [COLOR="Red"]Window::hInst = hInstance;[/COLOR] .... .... } [/code] The … | |
I've been given this work to do for uni, can somebody give me some hints how to start it? 1. In order to demonstrate your understanding of Object Oriented Programming within a visual environment you are required to create an object oriented graphical program to simulate a simple telephone network. … | |
The function that I am having a problem with is in the middle of this seperated from the rest of the code. [code=c++] #ifndef GRAPH_H #define GRAPH_H #include <string> #include "queue.h" using namespace std; class FileOpenError // Exception class -- cannot open input file { }; struct EdgeNode // Structure … | |
hello Im starting into programming and Im triying to program a pic to collect pulses, and for each pulse it accumulates 10 but when I start a new pulse sequence it repeats itself again and again till the memory fills up and gives error, the problem is that I cant … | |
I've written a UserControl, and within that control the user is able to change some properties on a form. I can't figure out how to display the changes in the property grid. The only time I've been able to update these properties, is in the UserControl's Load event. This won't … | |
Hi , what are the steps to make a .net application launch automatically when the computer is booted.I am working with c# , so a solution in VS 2003/5/8 or links would help. Thanks - | |
Hi, i have the following script: [CODE] #!/bin/perl -w use strict; $ENV{"PATH"} = ".;" . $ENV{"PATH"}; print "Revesing the history file...\n"; print reverse <> history.txt > history_rev.txt; print "Reversing the XpressClients file\n"; print reverse <> XpressClients.txt > Xp_clients.txt; print "Parsing the XpressClients file...\n"; require 'Clients.pl' Xp_clients.txt > clients_file.txt; [/CODE] the … | |
I have a 2d char array and i need to find the position of a specific char in the array. what method can i use. return Arrays.binarySearch(this.matrixCopy, "S"); does not work it keeps returning -1 when there is an S in the array. | |
i have set up a mysql db for storing news articles to be displayed within a flash website. i have now been asked if i could add an image upload function to this section. i have created the upload page and i can upload the images to the db fine. … | |
Hi, I'm curently creating a command line tool in VC++ 2008 Express Edition for myself which requires reading many files and merging them together. Everything is OK and during debugging (F5) there is not a single problem, but at run time (ctrl+F5) a problem with fread occurs at the same … | |
how can i make the computer block when im about to score, like do something like this XXXO? and how can i make the computer to make an OOOO for it to score too? im not allowed to use internet libraries in this one, need help | |
Hi Everyone, I'm designing a database for a Motoring School and I've been given the following information: • Pupils book either a single lesson or a course of lessons. Pupils are allocated a particular instructor when they register with the school. Sometimes, pupils ask for their instructor to be changed. … | |
I'm about to start writing a genetic algorithm program which will be able to find the highest/lowest/whatever else values of variables required for an equation, and have come upon a point about which I am uncertain. I do not know whether I should store and work upon the values as … | |
Hi guys, I have a type that implements an abstract class that is known at compile time and I want to construct at run time an instance of the type and place the reference in a variable that is of the abstract class's type. So, to describe it a bit.. … | |
I have a qns. How can i take out the number in a basic string input and assign them into different integer variable? Not a file input example - string input = "23/4/56" or "23.4.56" int a = 23, b=4, c = 56 [code==cpp] #include <iostream> #include <string> using namespace … | |
I fetch the data datafrom database in to a datatable and bind it to a datagridview.Now I want to edit the data shown in the datagridviewand also want to add new rows in dgv.The editing part is going ok but I m not able to add new rows in dgv.Also … | |
hello guyz,, i am really confused,,,we are about to make a program in java,,,we are making an ATM,,,however i am confused because i only have a transaction in ATm once and i dont remember much because it was 3 years ago... before i start,,i want to ask... what is in … | |
![]() | I made this program but I need to figure out how to exit the program if the user does not input A,B,C,D, after three attempts. I'm new at building programs and I would be grateful for some help! #include <iostream> using namespace std; char studentAnswers(int); int main() { int i; … |
ok, i've got a question that i'm having trouble with Write a program that generates the factors of a number entered by the user. This program has the following requirements: 1. The user must enter a positive integer. If the user enters something else, your program should output an error … | |
im beginner in visual basic can anyone help me please? i have 1 command botton and 1 picturebox my command button name is Switch every time i click my command button Switch the image in the picturebox change for example i have already an image in the picturebox Sunset image … | |
Hi all. I am attempting my first Gnome applet creation and I found a great tutorial at [url]http://projects.gnome.org/ORBit2/appletstutorial.html[/url] . Unfortunately, I am stuck where the example goes to load an image. I can compile the applet and make it run but when I add it to the Gnome bar it … |
The End.