199,124 Archived Topics
Remove Filter ![]() | |
This function should create an array of size 50 containing randomly generated letters within the range [1, 25]. The program should write the randomly generated array to an output file named by the user. Determine the maximum and minimum values and the indices of their first occurrence and also the … | |
I'm having a problem in program trying to access pieces of an array. My array is declared as: [CODE]mapping DB 7,0,8,1,9,2,4,3,5,4,6,5,1,6,2,7,3,8[/CODE] The procedure that uses the function is: [CODE]infloop: _GetCh noecho cmp al, '@' je gameEnd playerGoes: mov si, 0 playerLoop: cmp al, [mapping + si] add si, 2 jne … | |
i made macro named print as following : print macro str .data x db str .code mov ax,seg x mov ds,ax mov ah,09 lea dx,x int 21h endm it's worked very well when called for one time but when called 2 or more error message appears that is 'duplicated defining … | |
Good Day, How would you code in VBScript to read the content of multiple HTML files into an array? Please observe the below sample and modify as necessary. My requirement is read multiple files by extension and not simply specify a single file. Const ForReading = 1 Set objFSO = … | |
I have a palindrome program.Is there a way to ensure user input terminated in a string by a punctuation mark (e.g. ‘!’, ‘.’, or ‘?’.) in an array? And how do i get the program to exclude commas? | |
[B][I][COLOR="Green"]please guys i need help on the above. write a finction in c to find the number of times that a given word (i.e a short string) occurs in a sentence.[/COLOR][/I][/B] | |
[CODE]#include<stdio.h> int main() { for(;0;) printf("Hello"); return(0); }[/CODE] This code should not give any output, but it is printing Hello once. I'm using TC++ 3.0. Is something wrong with the compiler? | |
Hi all, I am working on a program which will generate a log file for it's operation. Because of the way the program is designed, the program maintains a String variable for all the log that needs to be written and write that string into the file at it's exit. … | |
Hi there, I have just started using java and have gained a bit of knowledge in it to start making small programs to run in cmd. I have recently been making one to determine which, of 4 objects, can reach a random point in a 1km square. I have managed … | |
I am working on a similar program and am getting an error that states 'strcmp' cannot convert parameter 1 from 'const char' to 'const char *'. ( I haven't gotten to the swap yet.) Do you know how I should fix this? [code] #include <stdio.h> #include <string.h> #include <ctype.h> #define … | |
hey .. i write this code .. but i have errors .. i think because i didn't use the enum in the right way?! .. can anyone tell my how to correct it .. i got these errors :( .. : 'stone' : redefinition; different basic types see declaration of … | |
hello everyone.. please help me with my program. Please help me solve a program that could accept more than 10 digits. Thanks | |
I am a newbie to java. I have heard that Java is a programming platform. Did it mean than it can work both in Windows and Linux. Or if it doesn't ,what does a programming platform mean to be? | |
this program should add 2 integers in the range of 20 digits, but only 10 digits are allowed, else the sum would be incorrect. can anyone plz show me what's wrong with my codes? Here's what i got so far.... [CODE]#include <cstdlib> #include <iostream> using namespace std; int main(int argc, … | |
I'm trying to validate some things on this form. (I've omitted some of the totally uneccesary code below. I'm first trying to tackle the "card" radio buttons. When I hit the submit button, it's just sitting on the whole thing. Can't figure out what I'm doing wrong here: [code] <html> … | |
Hi I am doing a vending Machine application. Now I can insert denominations from 5 10 20 50 1pound and 2 pounds. Is there a way of filtering the most efficent coin combination to pay for the snack. e.g. I have a snack for 45 pence. I insert 2 pounds … | |
So, by now it seems like C++ will be the futures programming language. But what do [B]you[/B] think of the future of programming languages?? Will it be easier and better for the user to use it and handle it? Write down every thing about programming language that pops up on … | |
[B]So here is what I am trying to accomplish. I have been trying and trying for a few hours to figure out how to do this. Write a program that displays a menu with the following choices to the user. A - Find the largest # with a known quantity … | |
in the book "advanced programming in the unix environment" the authors give the following function to "deamonize" a process [CODE=c] void daemonize(const char *cmd) { int i, fd0, fd1, fd2; pid_t pid; struct rlimit rl; struct sigaction sa; /* * Clear file creation mask. */ umask(0); /* * Get maximum … | |
[B]i have a problem in a program i am making. In my program i need to call a function again and again until the string entered in it is not correct. Initially i was using gets() but it wasn't accepting the string.[/B] [B]i cahnged it to scanf(), so it is … | |
HI.. I want to create an webpage such that when user will enter their username and password,the data will be stored in a database(I am using MySQL).I have the code.But when i am trying to run the servlet,its showing following error: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver I have set the classpath of the … | |
Hello all, I need to write a code that compress and uncompresses thegiven file in c.Well i know there are many algorithms available ,one of the famous algorithms is Huffman's algorithm.But how do i implement the algorithm ?.I googled a lot but couldn't able to find ?.Is there any simple … | |
I'm newbie in Java please help. 1. Create an array with 20 elements.. I know this. This one i don't know.. 2. The program must ask the user to input an element to search for and prints a message: "Found[search key]" then print the remaining data on the next line … | |
NOW I HAVE SHOWED SOME EFFORT PLEASE HELP ME NOW, HERE IT IS WHAT I WOULD LIKE TO HAVE AND WHAT I HAVE DONE WITH THE CODE. Hi, i have to programm this in c++ can anyone please help me and solve the code i have written Material Weight (kg … | |
hi i want to know whether my coding is correct because data is not getting inserted in my sql table,but it is displaying the "data inserted" message<html> <head></head> <body> <?php $uname1= $_POST['uname1']; $cname=$_POST['cname']; $caddr=$_POST['caddr']; $mid=$_POST['mid']; $skills=$_POST['skills']; $degree=$_POST['degree']; $indtype=$_POST['indtype']; $desc=$_POST['desc']; $req=$_POST['req']; $yoe=$_POST['yoe']; $sal2=$_POST['sal2']; $search=$_POST['search']; $hostname = "localhost"; $username = "uname"; $password … | |
// David Barkman // CSIS 123 - Murtha // Program 13 // #include <string> #include <iostream> #include <fstream> using namespace std; void displayMenu(); void addRecord(); void searchRecords(); string userName; int main() { // Prompt fior the user name cout << "Please enter your name to begin: "; // Input the … | |
hey guys i have been troubled by this for quite some time now. i have this example code in the command button. Dim ctr As Integer, ctr2 As String ctr2 = lst1.ListCount x = Val(txt1.Text) For ctr = 0 To ctr2 If x = Val(lst1.List(ctr)) Then MsgBox "Error Duplicate" Else … | |
hey need some help guys. for example i have a text box and i will have input in it. but only numeric ones are allowed to be inputted in the text box if a character for example "a" is pressed the text box will not change and type the "a" … | |
Cold fusion do not support input param array like below: <input type='hidden' name='hid_id[]' value='1'> <input type='hidden' name='hid_id[]' value='2'> <input type='hidden' name='hid_id[]' value='3'> Whereas PHP can handle it as an array. But i have a code which will display some events and their corresponding child events in a page. User can … | |
[CODE=c++] const int MAX=200; char line[MAX]; char s2[MAX]; inf.getline(line,MAX); for(;;) { for(int i=0; i < MAX ; i++) { if (line[i]=='\0') break; else if ( line[i] != ' ') strcat(s2, line[i]); } } [/code] hello, I have a question. I'm trying to have the loop process words in the array … | |
I'm trying to write a simple program to identify if two phrases are anagrams of one another. I'm having trouble with sorting an array of characters and defining xarray and yarray. [code] public class Anagram1{ private String x; private String y; private char[] xarray; //? private char[] yarray; //? public … | |
I am having trouble with getting my data to display. The program works fine if I choose option 7 to display the balances and it exits if the user enters option 8 but I can't get it to perform the other functions. Can anyone help me to figure out what … | |
Hello, I want to add the following 2 functions to the code below. I have no Idea At all, Please Help. I want the images to rotate as they do now, but Id like to add random transitions to each image change. [code] function applyeffect(){ if (document.all && photoslider.filters){ photoslider.filters.revealTrans.Transition=Math.fl … | |
I need to this program to let me enter in an letters A B C or D so this program can run, why isn't this program not working, please help. Here is my code: public class DriversLicense{ public static void main(String [] args) { //Students answers to the questions char … | |
Hi, I am a first Year Computer Science student learning java. First, what I want help with is not a homework assignment, I just started it on my own. This program is supposed to test the "Chaos Game" The chaos game is explained here: [URL="http://mathworld.wolfram.com/ChaosGame.html"]Chaos Game[/URL] So, the basics that … | |
The following 3 pages which are user activated popups on my site are not rendering in mozilla firefox. Raw source is displayed instead. I dont know why. [url]http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9948[/url] [url]http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=7101[/url] [url]http://herproom.5.forumer.com/index.php?act=Attach&type=post&id=9817[/url] | |
I get the program to run but no matter what choice i make it comes up with -99 to exit... [code=cplusplus] #include <iostream> using namespace std; const int A_QUANTITY = 10; const int B_SENTINEL = -99; int main () { bool again = true; char choice; int biggest = 0; … | |
If I were to ask the user to enter the number of employee. Could I put that user entered number into an array? If so how? for example [CODE] int num; cout << "enter number of employees: " ; cin >> num; array[num]; [/CODE] this code doesn't actually work because … | |
I have a project where I need to reformat a plain text file. for example, Hello nice to meet you. Glad to be here. will be reformatted to the following: Hello nice to meet you. Glad to be here. how can i write a code to remove the newline character … | |
I'm working on a program that reads in from a file a list of customers and puts them in a vector. I did that. Next, there is a file for each customer that I put in this vector. I need to open the file, and "assign the data to a … ![]() | |
I am writing a program and one of my classes is called Employee the private variables for Employee class are string firstName; string lastName; I have a child class called StaffEmployee and for its private variables I would like to use int employeeID; I want to create an object in … | |
hi i write a program to add a value in windows registry but it didn't work and doesn't add anything in registry, what's a problem? my assembler is masm32. and here is my code: [code=asm] .386 .model flat, stdcall option casemap:none include windows.inc include kernel32.inc include advapi32.inc includelib kernel32.lib includelib … | |
hi there! how do i read a specific line from a text file? maybe im asking the wrong question, so i will try to explain what im trying to do :) i have a file that looks a bit like this(just with 1000 lines): 1 dudea addressa 1000 10000000 maila … | |
I am going through and rechecking my work on a project and was hoping someone might see if I am on the right track. First off the project is as stated: A baseball team manager wants a report showing her players' batting statistics. A batting average is computed as hits … | |
I have a person datafile of many entries. Persons will be stored in a linked list and each of the person amongst other things will have a linked list of items belonging to them. The object of the program is to use a quicksort algorithm to print out entries of … | |
Hi im trying to print out rows and columns using ascai characters to resemble pixels. I am trying to get the user to input the dn values for the array and then use these values to then print out the appropriate character. Im really stuck now and have been at … | |
Good Morning, This is a bit of a double question thread. First what i have done is written a basic stop watch program, it runs through the loops and iterates the time on screen. My first question is this: is there some way to leave the program listening for user … | |
When I execute the program (just to test my progress), it returns an infinite loop (i think of main() or enter(). I am posting the entire source code here, maybe somebody could help me better organize it. In hte future, I would like to add a save feature. This is … | |
Hello there! I.m trying to write a function that should delete specified entry from .dat file. But it just ADDS TWO MORE NEW ENTRIES- the same as the last entry in that file. I'm trying to read all entries into temporary file and then write them all back, except the … |
The End.