132,726 Archived Topics
Remove Filter ![]() | |
so i have been trying to learn how to manipulate text on my own and have gotten stumped... let's say i have a text file that says (highly simplified): people ordinary How would swap the order of the words.. I know i need to use sed and some kind of … Software Development shell-scripting | |
Hi, I'm in URGENT need of anyone who can help me with the following TicTacToe code. When you run it, it lets you click a box. When you click a box, X appears. The, when it's O's player's turn, it will not print an O. [CODE] import javax.swing.*; import java.awt.*; … Software Development java java-swing | |
public class XClass { private int u; private double w; Public XClass () { } Public XClass ( int a, double b) Public void func() { } public void print() { } } XClass x = new XClass (10, 20.75); Q1. How many members does class XClass have? Q2. How … Software Development java | |
:o [COLOR=Red]When I start the program it just spits out a continuous line of numbers; Can anyone give me any suggestions, OR better yet, just tell me how so I can start my Thanksgiving break early?[/COLOR] :o [CODE]/* Program Description: The program will read a file named Scores.dat, and will … Software Development c++ | |
I've created a program that counts the amt. of characters, words, and lines in a text file...I also need it to count the number of blank lines and the number of vowels in the text document. I don't know why, but I cannot seem to get it to work. If … Software Development java | |
Hi everyone. At the moment i am doing my thesis for my degree. The title is: "Compare and contrast Oracle client/server technologies with oracle web technologies. Design a business application and depoy it in both. " To compare the applications i am going to use java. I am going to … Software Development client-server java oracle web-design web-server | |
I need to add a recursive function, called [B]findaverage()[/B] into BST class that takes as input the root of the BST and returns the average of the entire integer items stored in that BST of integers. Plz help me with this function especially without using any static variables. Software Development c | |
I just can't figure out why this program isn't reading in the entire file. It will only read in the second line, nothing else. Here are my read and write functions: bool Write(string Text,string FileName){ fstream Write; Write.open(FileName.c_str(),ios::out|ios::app); if(!Write){ cout<<"Error in opening file"; return 0; } Write<<Text; Write.close(); return 1; … | |
Public class Prog1 { static final char = BLANK = ` `; static final char ONE 5; public static void main (String[] arg); { a = one + 5; b = a + blank; cc := a + one * 2; ONE = b + c; System.out.println(''a = '' + … Software Development java | |
You know, when my brother was learning C in college I took an interest and learned a little (that was back in 1998. I have forgotten C by now) but shall I tell you what really put me off ? In his class, they were teaching him one version of … Software Development c++ | |
Hi, I am working on a project using Java and embedded SQL in the Java. I have gotten the SQL to successful do what I need it to (In this case, create tables and insert data into them). However, I am having a difficult time with IO. The goal is … Software Development data-science java mathematics sql | |
sorry my bad english and maybe if u can write this source so give me ? (use a stack and tree) :cool: Software Development c | |
I'm having a problem whereby I create an instance of a class called Calculations.class in one of my main classes, but cannot access that instance from any other class. Here is the code public class Parameters{ //code// Calculations calc = new Calculations(); //some calculations done using variables in the calculations … Software Development java | |
hi every body can any one help how to start with this project using the c++ ADT class ,write aprogram that simulates the operation of telephone system that might be found in asmall business, such as your local pizza parlor.Only one person can answer the phone(aingle server queue). but there … Software Development c++ operating-system queue | |
hi..im new here and i am having trouble with my program..using DOS-based C++, i have to create a program that will use a mouse pointer but unfortunately i don't know how to create one because that is beyond our topic..so if anyone could help me..please give me the code and … | |
Days since 1/1/1800,that day was Wednesday. Need to convert a date in the form mo/dy/year into this single number. Need a function to print out the day of the week, and a function to print out the date in the form month day, year where the month is completely spelled … Software Development c++ file-stream | |
I am working on a project which involves a server/client model running over a network. The server is written in Java, and the client is a C++ addition to an existing product (which is written in VB and C/C++). I chose to write my section in Java simply because I … Software Development c++ client-server file-stream first-post java mysql xml | |
Can anyone give me a basic script that takes a string and converts it into a characters using the nexttoken command to get the next char for searching purposes. Software Development java | |
Hi guys It has been quite a long time since my last post, but I am having some very weird behaviour on a program I am writing and I was hoping to get a little community feedback ;) I am writing a class that basically opens a pipe to ksh … Software Development c first-post | |
Hi i need an explanation of the following array declaration: GLfloat colours[][3] Why are the square brackets empty, does it imply a default value? so it has say 1 row and three columns? Thanxfor your help in advance it is much appreciated Software Development c | |
Hi, This is really a logic problem more so than a stright up C++ problem. For class I have written a program that takes dates from a text file and then finds the number of days from January 1st 1800 that days is. The program also has to be able … Software Development c++ | |
Hello ladies and gents, could someone explain what I'm doing wrong here, the ideas of this excercise is: - Declare an array with 10 firstnames using pointers! - Show the array on screen using a function! - Sort out the names alphabetically and show the array again sorted! I want … Software Development c++ | |
[FONT=Verdana]New Member[/FONT] Hi everyone. I am brand spanking new. Like, just a few minutes born to the new kid in the DaniWeb block. Today I will just get the feel and browse. However, I will host a lot of questions that my experienced curiosity has brought to mind and many … Software Development c++ | |
This is kinda like "part 2" of my other post. Have also been working on this one for about 3 weeks. A suggestion was made that I should consider using the map container to accomplish what I want. My textbook doesn't talk about maps but I found some info on … Software Development c++ first-post | |
I've been fighting w/ this problem for about 3 weeks. My school's forum and another programming forum I belong to have been unable to help me (I can't get ahold of my instructor but the school is looking into that). When running the attached program, I get the errors /home/cody/Projects/wavelength/src/wavelength.cpp:19: … Software Development c++ | |
I'm trying to complete the following problem: write a problem that generates a table showing tuition and fee costs. the table continues to print up to and including a maximum number of credits that has been input by the user. The program should check that this value is between 12 … | |
a ball have radius 20 when i press a button once the radius increase by 5 subsequent clicks have the same effect until a max radius of 30 is reached after this the effect of click is to reduce the radius by 5 until it reach 10. after this a … Software Development java | |
I got a question one of my friends asked me to make a program that you type in the number 1-27 on the command line, and get the corresponding letter for it. Like if you enter 1 as the arguement you would get an A as an output, and if … Software Development c | |
Can anyone tell me the complete algorithm analysis of Tower of Hanoi for n pegs and n disks.I really need it :sad: | |
Hey everyone. I actually have a homework assignment that is due Tuesday afternoon that I've been struggling all weekend with. The assignment is located at: [url="http://cs.hofstra.edu./~cscsxd/hofstra/teaching/cs155-04/course_info/project/Recursion.cpp"]http://cs.hofstra.edu./~cscsxd/hofstra/teaching/cs155-04/course_info/project/Recursion.cpp[/url] As you can see, the function we have to write is: [code]int *Rectangular_Shortest_Path(int startx, int starty, int endx, int endy, int r[][6], int a[][6]) … | |
hi , i need a program for tollbooth simulation using arrays implementing queues in C++. can some one please help me out. prashant Software Development c++ | |
A method i have to write finds and prints "magic squares" which are numbers that are perfect squares and a sum of consecutive numbers (1+2+3,etc.) Ex. the first 2 magic squares are 1 and 1225 it seems simple, but what i have doesn't work and i don't know y or … Software Development java | |
[code] struct student { char name[20]; int age; int id; }; struct student *sp, st[3],temp ; void sort(struct student *p) { *sp=st[0]; p->age; for(i=0; i<3; i++) { if(st[i].age<st[i+1].age) continue; else if(st[i].age>st[i+1].age) { temp=st[i]; st[i]=st[i+1]; st[i+1]=temp; }break; } } /* switch case junk */ case 1: /* sort by age */ … Software Development c | |
[COLOR=DarkSlateBlue]undefined[/COLOR] hi, i m naya.i m student of telecommunicatin engineering.i have a lot problems in "C PROGRAMMING".plz tell me the codes to find max,min values....to print factorial of a number...how copy an array to other.....to print tables of numbers....n how to swaps in array.. plz they all codes should be … Software Development c engineering | |
I am having trouble coming up with code for removing a node in a binary search tree. This is what I have so far: [CODE] void remove(int n) { node *current=root; node *gptr; while(current != NULL){ if(n<current->key){ gptr=current; current=current->left; }else if(n>current->key){ gptr=current; current=current->right; }else if(n==current->key){ if(gptr->right->key==n){ cout<<"1st ==key = "<<gptr->key<<endl; … Software Development c++ | |
how do you convert to binary. i have to write a program that will prompt the user to enter an unlimited(user defined) number positive intergers, the program will convert each positive interger(base 10 value) into its equivalent binary representation and displat each conversation. to exit the program, the user is … | |
I am writing a turtle graphics program and I need help with 2 characters to show when the direction of my turtle is up or down. I am using cout << ">"; cout << ">"; for right and left and right directions. Any help will be greatly appreciated since my … Software Development c++ | |
I keep getting a null pointer exception with this code: It's suppose to load a text file into a textArea. [Code] JFileChooser chooser = new JFileChooser(); int returnVal = chooser.showOpenDialog(this); String getFile = chooser.getName(); if(returnVal == JFileChooser.APPROVE_OPTION) { try { FileReader filegetter = new FileReader(getFile); BufferedReader br = new BufferedReader(filegetter); … Software Development java | |
[COLOR=Red]How do I get the student names in all lowercase chars except the first letter which is capitalized?[/COLOR] [code] #include <fstream> #include <stdlib.h> #include <time.h> using namespace std; int main() { // Step 1: Declare ofstream OutFile; int NumStudents; int NumChar; int NewScore; char NewChar; // Step 2: Initialize OutFile.open("C:/Scores.dat"); … Software Development c | |
WHAT IS WRONG HERE?WHY WON'T THIS SORT? public class bubble { public static void main (String[] args) { boolean Finished; int[] intRand = new int[11]; int[] unSorted = new int[11]; int intStore; int i; Finished = false; i = 1; while (i < 11) { intRand[i] = (int)(java.lang.Math.random() * 100); … Software Development java | |
I'm having a bit of trouble working out what sort of loop to use in a program I'm writing. Basically, I have a file with 2 lists of numbers separated by ";" e.g. Name ;Magnitude 2713.0;21.546 2713.0;19.564 2713.0;20.102 2713.0;20.959 2714.0;22.031 2714.0;18.46825 2714.0;15.323 2715.0;22.808 2715.0;19.345 2715.0;21.357 2716.0;21.473 on so on up … Software Development java | |
OK PEOPLE I NEED HELP AGAIN........pls dont do my homework..........thats y i havnt given the question this time aroung :) the question im asking is simple : the program asks user to input product id ( a,b,c,d or e) and its quantity sold......it then saves total sale in "int sale" … Software Development c++ | |
Can anyone help? Instead of outputting the decimal 1.75, C outputs 7/4 as 1.0000. I very much need to obtain the exact decimal product of integer ratios to 2 decimal places and then compare it to another decimal number. For example, if (7/4 > 1.25) printf("Yes\n"); else printf("No\n"); --> So … Software Development c | |
[IMG]http://img.villagephotos.com/p/2004-8/807060/resultwanted.JPG[/IMG] the picture shows the result i wanna achieve but my program here which i modified: [CODE] #include <iostream> using namespace std; int main() { int k, m; for(k = 1; k <= 10; k++) { for(m = 0; m < k; m++) cout << "*"; cout << endl; } … Software Development c++ | |
static void myInit() { PrimitiveType=GL_POLYGON; LineSegments=3; } can someone tell me what static does to the function? Software Development c++ | |
I found a cool site to do a few programming assignments for me. My teacher is probably the worse programming teacher on the planet. It's cool because they help teach you in the code they write. I didn't feel like they were just "doing my homework". [url]www.imalamecheaterd00d.com[/url]. Check it out. … Software Development java | |
can anyone help with this i have to do a project and im running into alot of problems i have to write a discrete simulation to experiment with the performance of this strategy under different timeslice lengths and different dispatcher overhead times [dispatch latencies]. Do this by writing a simulation … Software Development java | |
i am a beginner, and i have 4 questions but i will only ask 2, 1. i have an assignement that says, write a program that will display one of three user-selected shapes, ('T'=triangle, 'D'=diamond, or 'R'=rectangle and 'X' to terminate). using a switch statement. please help me with the … | |
Greetings: I am taking my first C++ class and am a little stuck. I keep receiving three compiler errors, but I can't seem to figure them out. Can someone please point me in the right direction. The assignment is: Write a C++ program having a recursive function recursiveMinimum that takes … Software Development c++ |
The End.