199,114 Archived Topics
Remove Filter ![]() | |
I'm writing a Lottery program where the user type sin 4 numbers between 1 and 30, the program generates 4 random numbers. In my program I have stored the random numbers and the numbers chosen by the player in 2 separate arrays. The problem I have is that I dont … | |
hi, i'm working on an assignment for school, and i'm having a lot of problems when i try to compile it. one of the errors is about changing the functions into arrays and getting an error about pointers, and another is trying to get the right info to the right … | |
sir, ihave a doubt on converting a inputed decimel number to a octal number will u help me? | |
It is error free but it just doesnt cout for the user to continue or discontinue and it does now stop [code] #include <iostream.h> #include <stdlib.h> #include "simmons.h" #include <fstream.h> const int MAXCHARS = 500; char st_line[MAXCHARS]; char ch_option; int i_va; int i_ve; int i_vi; int i_vo; int i_vu; int … | |
is it just me or am i stupid? (save the comments har har) im using C++ to pull in a character from a file ... (going character by character) how do i check for a line feed, or return? [code]<img src="http://image.jpg" <-- return alt="image" height="100" width="100 />[/code] ive checked for … | |
hello i was wondering if somebody could help me. I'm having problems with the validation of the below code. When i run it, it seems to get stuck in the loop. The compiler i'm using is Borland C++ 5.02 Any sugestions would be greatly appreciated Dave #include <stdio.h> #include <stdlib.h … | |
if: static char s2[]="Catbert"; static char s3[]= "Ratbert"; what is the vvalue of strcmp(s2, s3)<0 "Please explain" | |
I have this program but a liitle confused about getting the loop to work. i have to write a program that inputs a text and a search string from the keyboard. using a function strstr locate the first occurrence of the search string of the line of text, and assign … | |
might be main or another method // dont know yet int[] num1 = new int[intA]; int[] num2 = new int[intB]; public static void cal(what do i put here) blah blah and class Homework7v2 { int a=0; // i need to use this int all the way through and // it … | |
Alright, PHP Beginner here. I was just wondering, does anybody know of any good PHP books out there and if so, can you recommend one to me that has both help with PHP and MySQL? I know some parts of PHP, such as the opening and closing tags (<?php and … | |
Ive been given this code as part of a lexical analyser for which i will be coding a syntax analyser - however the file the lexical analyser will be reading will come throught this code: public static void main(String[] args) throws IOException { BufferedReader din = new BufferedReader(new InputStreamReader(System.in)) ; … | |
Im writing an encription program and it keeps saying their are 2 missing return statements :cry: , any ideas? public class EncryptedMessage { public static final int NO_OF_LETTERS = 26; //a-z incl public static final int NO_OF_NUMBERS = 10; //0-9 incl public static final int NO_OF_CHARACTERS = NO_OF_LETTERS + NO_OF_NUMBERS; … | |
![]() | Gday all Just wondering what is the best Java editor(developer tool) to use. At the moment I am using emacs, but i am getting sick of after every new emacs page i open a command prompt window comes up aswell. Also the shortcut keys in emacs are a tad wierd. … ![]() |
How can I write a program that will read as input two strings and display the word true if the strings are the same and false otherwise. In this activity, two strings are the same if they contain exactly the same characters in the same order (i.e. 'A' and 'a' … | |
I'm writing a program that generates 5 cards, and I need it to tell me what type of poker hand it is. I really need help with this as soon as possible, so any suggestions that you could give me would be appreciated SO SO SO SO SO much. I … | |
This program displays the information of an input file containing dates and strings, the output is in the following form On day, January 1, 1800 The first day begins. [number of days since 1/1/1800; (1)]. My problem is implementing a correct switch statement to display the Day of the week. … | |
I need help with an initializer issue -- the following code works well: extern int i1, i2; typedef struct { char ch; int * * array; } qq_str; static int * a[] = { &i1, &i2 }; qq_str qq = { 'c', a }; However, I would like to remove … | |
Ando comenzando en la programacion en Java, ¿Alguien sabe por donde puedo comenzar? O podrian mas omenso intruirme acerca de las classes de java teoricamente hablando :rolleyes: | |
Hey can any1 figure out wat is wrong in this program...after i compiled it and executed the program ....I inputed the value of n...but after that it does not show the output...Can any1 help me plz..!! The program which I wrote is below:: #include<iostream.h> int sumofdigits(int n) { int sum=0, … | |
how to calculate the heigth,width and size of a image using javascript | |
Greetings everyone... I'm new to Standard Template Libraries thus I'm encountering problems now and then... I managed to get some examples on integer lists to work but the string lists give me nothing but grief... What I'm trying to do is to read a series of words from an input … | |
hi, i am a novice of .net technologies and i doesnt know from where to start and how to start and what are the softwares that i required and from where i could get more information on .net and i want to learn .net technologies plzzzzzzzzzzzz help me | |
there are 2 dimension arrays, how can print out the position of value than 4? for example 0 2 3 2 2 2 0 1 1 2 5 3 1 2 3 3 2 1 print out: The pos is ( 4,1). | |
Are the following array declarations valid, if not why?: "i'm confused!" const int SIZE=4; void main() { int a[SIZE]= {0,2,4,6}; static int b[SIZE]={0,2,4,6,8}; int x[SIZE-5]; int d[SIZE*2]; . . . . . . } | |
I'm having some real problems with a code that is supposed to find Fibonacci numbers using recursive, iterative, and optimized recursive techniques. I keep on getting this really strange error though: "fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 1786) Please choose the technical Support command on the … | |
Hi Everyone I have to write a grep program in C and I am not sure where to start. :?: I need to use strstr() from the standard library, and get it to work; but I dont know how to do that. And that's only half the program, the second … | |
How does the following print?: #include <iostream.h> #include <string.h> void main() { char s[50]; strcpy (s, "What "); strcat (s, "does this " ); strcat (s, "do?"); cout << s << endl; } Can you explain? | |
Man! I totally forgot the code this SORTING thing and now, I don't know how to do it again. I think having a vacation from programming was a bad idea... Any help contributions??? please... Here's the problem : ----------------------------------------------------------------------------------- A program that sorts the ten (10) input values either in … | |
hi i am student and a begginer to c++..i dont know what to do regarding this problem i need help.please help me to solve my assignment. Q:To Write a program in C++ that reads the name of a file as input and copies the contents of the file in reverse … | |
Hi i have written a program to reconise palendromes in a sentance. I have written a method to reverse a word but dont know how to get the string tokeniser to reconise the words in a sentance. could any one give me some advice on how to use HasMoreTokens this … | |
heres the start public class work { public static void main (String [] args) { int number = 1; } public static boolean ifstate() { if ( number == 0 ) blah blah } question - how do I get the second method to call on the varible from the … | |
please help me guys. | |
#include<iostream.h> #include<stdlib.h> #include "simmons.h" const int MAXCHARS = 500; char st_line[MAXCHARS]; char ch_option; int i_va; int i_ve; int i_vi; int i_vo; int i_vu; int i_letters = 0; int i_count = 1; int i_number = 0; int i_vowel = 0; char ch_char; void hope(); void vowels(); void letter(); void mike(); void … | |
hi i have been given this cwk for java programming. and i need help getting started. i dont want u to do it all but if u can help to get me started i would really appreciate it thank u. this is the task: A large car dealing company wants … | |
I have been asked to create a program that scans for a virus,detects the virus and removes it,it also has to scan the boot sector.I am very new to programming so this is a big task for me especially that i cannot find anything of any use to me, i … | |
Hi, this is the first time that I've used C. Anyway, I downloaded a C compiler (dev-C++), and I typed in this: #include <stdio.h> main() { printf("Hello, world!\n"); return 0; } When I run the program, it doesn't print the "Hello, world!", but I just see a dos window quickly … | |
the question is to be solved using loops,decisions and arrays!! QUESTION: [B]Statement of question: “AIRLINE RESERVATION" Write a program to assign seats on a 10-seater plane. Your program should first ask a user to enter 1 for First Class and 2 for Economy class. First 5 seats are economy and … | |
:sad: hi friends my name is A.Siddhartha currently iam pursuing my masters in information technology and i have to do project in C++ as iam very new to information technology as my background is chemistry so iam having problem in doing this project. so pls help me how to do … | |
Hi everyone, I have a jtextpane with some text which spans to about 10 pages and what i want to able to insert page numbers into the center bottom of the page. I am using the DefaultStyledDocument class as the default document type for my jtextpane. I hope someone can … | |
I want to take integer inputs separated by spaces and terminated by newline character. suppose the user will be inserting integers this way 123 566 789 45 34 8999 341 57 67 and then the user presses enter. so the program will read all the integers when the user presses … | |
I have a program that outputs the first 30 numbers of the fibonacci sequence. My declaration to hold the integers works and the loop to calculate them works but I am trying to output them 5 elements per line with a field width of 10. I have the field width … | |
can some please tell how can u hide whatever u are typing when typing in c++ exe. file? | |
Write a program that will read the file, Address.txt, which I have provided. It contains names and numbers with no spaces between. Write the same data to a new file with the numbers right justified in 12 spaces and with 3 decimals. (file): Pete Moss25.33 Sara Bellum78.45 Harry Legg 76 … | |
Hello ladies and gents, I have tried to write my sorting function but keep on getting error messages. Ive been reading the tutorials on this forum wich explaines alot but I'm still having lots of trouble in comprehending how pointers work and more important, how that I can correctly write … | |
How can i move between different methods with the same class. When i programmed in VB, it was just the name of the subroutine, but i cant figure it out in java. Please put me out of my misery | |
I get this when I try to load my program, yet the compiler says its fine. Please help! Exception in thread "main" java.lang.NoClassDefFoundError: PIStudy$DoPolyINTest at PIStudy.<init>(PIStudy.java:51) at PIStudy.main(PIStudy.java:121) [CODE] import javax.swing.*; import java.util.Random; import java.awt.*; import java.awt.event.*; public class PIStudy { public JFrame window; public JButton name; public JButton comb; … | |
//.... int vals[] = new int [12]; vals[18] = 10; catch (ArrayIndexOutofBoundsException) { //handle error ... } | |
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 … | |
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.*; … |
The End.