132,726 Archived Topics
Remove Filter ![]() | |
[CODE]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include <iostream> using namespace std; int Factorial(int iNum); int main() { int aNum; cout<<"Enter a number: "; cin>>aNum; cout<<Factorial(aNum)<<endl; system("PAUSE"); return 0; } int Factorial(int iNum) { cout<<"We are at number: "<<iNum<<endl; if (iNum <= 1) { cout<<"We are at number: "; return 0; } else { return Factorial(iNum … Software Development c++ | |
hey i guys iam trying to make a postfix calculator it works very well with the number but when u tried to add parantheses the code doesnt seem to work well [code] /*Programmer : Ramy Selim * E-mail:themurder2005@hotmail.com * postfix calculator */ using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; … Software Development | |
Hey! Worked on one problem couple days ago and then found code on internet that did almost the same: [CODE] map<string,int> stringCounts; string str; while( cin >> str ) stringCounts[str]++; map<string,int>::iterator iter; for( iter = stringCounts.begin(); iter != stringCounts.end(); iter++ ) { cout << "word: " << iter->first << ", … Software Development c++ | |
hi i m mohan sahu.i m using turbo c( borland compiler) and working with windows xp. i have one header file say myheader.h having only declarations of all functions and one myfunc.c file having only definitions of all function without main and i m including header file with #include "myheader.h" … Software Development c | |
I made this applet for my APCOMPSCIA class, it due tomorrow but I cant get it working. I need to show the animation of a sort, but it just does sort once that it, please help. I will be very great full. [CODE]import java.applet.Applet; import java.awt.*; import java.awt.event.*; import java.util.Random; … Software Development algorithm java java-swing | |
Hi, Guys I am a beginner please help me. I wrote something like this: [CODE=cplusplus] #include <iostream.h> #include <string.h> #define number 1 #define length 35 char student[number][length]; int i,j,k; char *BlankImprover(char *); void InsertInfos(void); void main(){ InsertInfos(); for(i=0;i<number;i++) for(j=0;j<15;j++) cout<<student[i][j]; } void InsertInfos(){ char name[15]; for(i=0;i<number;i++){ cout<<"Enter Student Number <"<<i+1<<"> … Software Development c++ | |
can anyone tell me the code how to create a textpane with scrollbars inside a tabbed pane.....and i should save the text in a file on button click.... Software Development java | |
[code=java] import java.util.Scanner; import java.util.regex.*; import java.io.*; import javax.swing.*; /** * A program that parses a user-supplied URL */ public class URLParser { public static void main(String[] args) throws IOException { Scanner scan = new Scanner(System.in); PrintWriter out = new PrintWriter(new FileWriter("D:\\cs2200\\lab8\\URLs.txt")); String input=""; // Everything works the way I … Software Development http-protocol java java-swing legal regex | |
am trying to append to file but its not going correctly every time it fail to connect to file [code] #include<iostream> #include<fstream> using namespace std; int main() { fstream file; char word[256]; file.open("StudentInfo.txt",ios::app); //file.open("StudentInfo.txt",fstream::app); // wont work too if(file.fail()) { cout << " Error opening the file " << endl; … Software Development c++ file-system ios | |
Is there any way that I can get PERL to give me the elapsed time that it took to calculate something? I'm trying to make my algorithm for finding prime numbers more efficient, and obviously I can't tell the differences in the time it took to generate the list, so … | |
hello guys im stuck for quite a while with this problem and i badly need ur help. in fact i wanna make the red rectangle slow down when it comes close to the blue one. it would be nice if they both move at the same speed. ive tried several … | |
Hello, I'm not sure that this shouldn't be in the Computer Science Board because it is mostly a theory question, but it is also implemented in C, so here it goes. I've been looking at some ways to make a modifiable array to hold geometric data for a simplistic 3D … Software Development c data-science opengl | |
Hello, I am creating a client/server application that verifies math equations for addition, subtraction, and division. I think I just need someone else’s eyes to possibly see where I am going wrong with this. Everything seems to be working fine except for one variable. This is the String serverAnswer variable … Software Development client-server gui java java-swing | |
I'm moving from VB to C, I've learned about the basics of c upto using arrays. I'm self-studying & experimenting now how to display text files as databases. this is the code i use to display text files: [CODE] #include<stdio.h> int main() { FILE *f; char buf[100]; f = fopen("test.txt","r"); … | |
hey All. I am currently working on a project to create a basic student registration system using classes and other sorts of stuff later on... as of now, i am to create three classes as follows: Person, Student, and courseInfo. I have to create a simple driver program that allows … Software Development c++ | |
Hi, This is my first time on daniweb, so if I've posted in the wrong section or there's already a similarly-themed thread or I've done something wrong I apologise. Anyway, I'm hoping someone can prod me in the right direction with a problem I'm having right now. I'm currently working … Software Development flash python tkinter user-interface | |
How would it be possible to code inside a button that the Browser will open and go to address: [url]http://www.google.com[/url] private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { //Code here to go to: [url]http://www.google.com[/url] ? } Software Development c++ | |
I have all my code for this. I have the code to read a txt file, write a txt file, convert the infix to postfix and evaluate it. I am now just having trouble putting it all together. I need it to read the text from a file convert each … Software Development file-system java | |
i was given an assignment by my prof. , but he stated that using pointer notation . the object t=of the program was to write a C++ function ReverseArray using "pointer notation" that will write out the elements of an array of int in reverse order. his comments were This … Software Development c++ | |
Hi All, I am looking for a charting component purely for VB 6.0, I know VB has inbuilt Microsoft's Charting Component, but it does not solve my purpose. I need some cool look charts, If you guys know any such component, do let me know. Software Development visual-basic | |
im fairly new to vb 6 and doing a course which requires a project. in my project i need to save a name, age, and form of a user in a random access file when a button is pressed which i have done, and then when another button is pressed, … Software Development visual-basic | |
Hey! do you know the game snake? well my professor asked us to develop it in c++! It`s crazy!Although he said write a simple program but I`m still confused!Can someone pleassssssssse help me with it? The snake should eat and Its length and score should increase and also do not … Software Development c++ | |
I have to write a program that simulates a basketball game... I have the majority of it worked out with the following two exceptions 1) I can't figure out how to make my timer work. Each game is broken up into, quarters then into match ups. Each match up is … Software Development visual-basic | |
can anyone here know how to make a fade in and fade out label? in visual basic? Software Development visual-basic | |
Is there any way to insert an empty line in a string type variable. string textFile = "abc"; textFile = textFile + string.Empty; textFile = textFile + "def"; This is what I'm trying. But the string.Empty has no effect. This also neither works textFile = textFile + "\n"; Any suggestions? Software Development | |
Greetings, I have a 48x88 matrix and I need to sum the 1st element to the 23rd, the 2nd element to the 24th, etc until the 66th to the 88th (always using a 22 interval). Then I have to divide 100 by the sum of each column. The result will … Software Development | |
How to wait for some time while writing to a file. I am appending some text in log file, its giving error as Some other process using this file. How i have to wait untill its free. Software Development c# | |
When building classes I thought if I just added an enum to the parameter list it would pop up the list of the enums, sort of like intellisence.. But I clearly am missing something.. [code] public enum eFullWeekDays { Sunday = 1, Monday = 2, Tuesday = 3, Wednesday = … Software Development | |
can you please give me an article address which tells when to use stack and when to use heap, how to use them properly and the performance issues related to usage. Thanks Software Development c++ | |
Hi! I have a problem to make a list of students (i know how to put all the input and to calculate the average of the students grades) but i don't know how to put the students in new list arrayed by their average form biggest to smallest and if … Software Development c++ | |
[code=java] import java.awt.EventQueue; import javax.swing.JFrame; public class tatat extends JFrame { private static final long serialVersionUID = 1L; public static void main(String args[]) { EventQueue.invokeLater(new Runnable() { public void run() { try { tatat frame = new tatat(); frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } public … Software Development gui java java-swing | |
Hey! I am college student training for exam. Found one problem and I know you'll know what to use straight away. Here we go: We got a file where the excel sheet is encrypted like this: 1;2;3;=A2 ;;1;4;5 ;=580*A;=D2+1 Formulas are just simple ones, max. two numbers and *, /, … Software Development c++ | |
Hi, I need start IE in new window without addressbar, status bar but I cannot use kiosk mode (I need defined window size). I need to know the processID of the IE process also. I have 2 different codes: System.Diagnostics.Process p = new System.Diagnostics.Process(); p.StartInfo.FileName = "C:\Program Files\Internet Explorer\IEXPLORE.EXE"; p.StartInfo.Arguments … Software Development | |
hi, i am using rtb. I want to print a specific character when user presses Alt+some key by using chrW() method. I want to detect in KeyPress() event of rtb when user presses Alt+Key. How can i do that? I know i can detect (Alt+x) like combinations in Key_Down event … Software Development visual-basic | |
i have exams tomorrow and i really really need someones help on my problem. here how it goes: "we have 100 students info such as surname,name,id and grades for 6 lessons for those students. the program must: - can take grades from 1 to 10 - can calculate and find … Software Development c | |
[code] import java.io.*; import java.util.*; import java.io.IOException; import java.util.Scanner; public class Lab { public static void main(String[]args) { System.out.println("MAIN MENU"); System.out.println("<1> Bahasa Melayu"); System.out.println("<2> English"); System.out.println("<3> Exit"); System.out.println("Your selection (1,2 or 3)?"); Scanner read = new Scanner (System.in); int selection = read.nextInt(); if(selection == 1) { System.out.println("Hello, apa khabar?"); } … Software Development java | |
i have 2 table in my database access 1 is temporary and the second one is temporary2, how can i save all the data in temporary to temporary2? im using adodb. Software Development visual-basic | |
Hi! So, I'm new, and I had gotten this book on how to make an RPG. Well, as I was typing the code, it underlined some words, but at that time I didn't think anything of them, and now its being a pain. DX Here's my code that has some … Software Development vb.net | |
what is the usual cause for "out-of-line member function declaration" compiler error? Software Development c++ | |
QUESTION: The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? I was trying to solve this problem. I was previously suggested to use the "Sieve of Eratosthenes" Method to find the prime nos. [url]http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes[/url] I came up … Software Development c++ visual-studio | |
I am trying to write some simple information to a file and i am getting the error message "No such file or directory when i know full well it exists. If you take the url [url]http://www.adamplowman.com/uni_project/log.txt[/url] you get the file heres the code [CODE]#!/usr/bin/python print "Creating a text file with … Software Development file-system python | |
how do i learn programing?eventhough how hard i try to understand the languages, i can not absorb it, pls help me about it Software Development visual-basic | |
Implement a subject scheduler using the topological sorting algorithm. The program shall prompt for an input file containing the subjects in the set and the partial ordering of subjects. A subject in the input file shall be of the form (number, subject) where number is an integer assigned to the … | |
[CODE] import javax.swing.*; public class A { public static void main (String args[]){ String ask = JOptionPane.showInputDialog("Enter"); if(ask.equals("hello")){ System.out.println("ok."); main(args); }else if(isRepeat(ask)){ System.out.println("Invalid,string has been repeated."); System.exit(0); } } public static boolean isRepeat(String ask){ if(ask.equals("hello")){ return true; }else{ return false; } } } [/CODE] Hello, I am having problems with … Software Development java java-swing | |
I have a class derived from a TableLayoutPanel and if I have more than 3 rows or columns I don't show them directly, I add(I let the object add) scrollbars so I can reach the other cells. I have code that works perfectly,but... [CODE=csharp]public void CalculateSize() { const int cMaxCol … Software Development | |
I was just curious, besides the APIs and DLLs, etc, what is the difference between C++ compiled in windows, and C++ compiled in linux? Is it just the OS interrupts used in the machine code or what? Software Development c++ | |
hi all, i used the search function, but the threads i found didnt really help me much since i am quite a newbie and didnt understand how it worked. so what i am trying to do seems simple but it doesnt work. i have a textfile with a single line … Software Development c | |
Hi everybody, I have a VB 2005 (Express) application with SQL 2005 database; a report (named 'c:\Items.rpt') already designed and set to "Items" table. When I preview this report from Crystal Reports, it shows data correctly. How can I show it from within VB code depending on its default dataset … | |
Hello- I am new to Visual Basic and have done tutorials, as well as checked VB help and online to help me with this problem, but I can't figure it out. I am trying to make a 'Supervisor field' in an excel spreadsheet mandatory. If users do not complete this … Software Development vb.net visual-basic |
The End.