199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for mus_203

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 …

Member Avatar for mus_203
0
114
Member Avatar for hkb

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 …

Member Avatar for Dave Sinkula
0
113
Member Avatar for gowswan

sir, ihave a doubt on converting a inputed decimel number to a octal number will u help me?

Member Avatar for Dave Sinkula
0
124
Member Avatar for hopeolicious

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 …

Member Avatar for jwenting
0
122
Member Avatar for jaeSun

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 …

Member Avatar for jwenting
0
163
Member Avatar for docetes

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 …

Member Avatar for jwenting
0
160
Member Avatar for Faramba

if: static char s2[]="Catbert"; static char s3[]= "Ratbert"; what is the vvalue of strcmp(s2, s3)<0 "Please explain"

Member Avatar for Dave Sinkula
0
185
Member Avatar for ellas747

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 …

Member Avatar for ellas747
0
140
Member Avatar for ultimate_fusion

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 …

Member Avatar for jerbo
0
110
Member Avatar for Young Teck 06

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 …

Member Avatar for Young Teck 06
0
356
Member Avatar for MrScruff

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)) ; …

Member Avatar for jwenting
0
108
Member Avatar for fulmont99

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; …

Member Avatar for fulmont99
0
163
Member Avatar for jonoj

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. …

Member Avatar for jonoj
0
255
Member Avatar for dncloud

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' …

Member Avatar for jwenting
0
137
Member Avatar for Faramba

Please help me with this: Declare an integer array named "scores" to contain 50 elements. & Generate a code (a loop) that will initialize every element in the array from the above declaration("scores") to the value 75.

Member Avatar for jwenting
0
148
Member Avatar for alanna

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 …

Member Avatar for alanna
0
197
Member Avatar for dontcare

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. …

Member Avatar for dontcare
0
113
Member Avatar for craigt

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 …

Member Avatar for craigt
0
323
Member Avatar for vyk2rr

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:

Member Avatar for alc6379
0
182
Member Avatar for Extreme

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, …

Member Avatar for Extreme
0
98
Member Avatar for Deepa
Member Avatar for BSaltturk

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 …

Member Avatar for khuman_nb
0
1K
Member Avatar for sky2006

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

Member Avatar for vavjeeva
0
99
Member Avatar for bright2000

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).

Member Avatar for Phaelax
0
83
Member Avatar for Faramba

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]; . . . . . . }

Member Avatar for Richard Wong
0
106
Member Avatar for lostinthespiral

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 …

Member Avatar for lostinthespiral
0
242
Member Avatar for kiki021600

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 …

Member Avatar for frrossk
0
128
Member Avatar for Faramba

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?

Member Avatar for Dave Sinkula
0
85
Member Avatar for Archer

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 …

Member Avatar for Dave Sinkula
0
163
Member Avatar for muaaz

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 …

Member Avatar for jwenting
0
82
Member Avatar for grifflyn

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 …

Member Avatar for mcclth
0
183
Member Avatar for ultimate_fusion

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 …

Member Avatar for ultimate_fusion
0
147
Member Avatar for nowmn
Member Avatar for hopeolicious

#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 …

Member Avatar for hopeolicious
0
219
Member Avatar for sam1

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 …

Member Avatar for sam1
0
111
Member Avatar for sheereybern

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 …

Member Avatar for jwenting
0
99
Member Avatar for Moo The Cow

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 …

Member Avatar for harshchandra
0
156
Member Avatar for Der_sed

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 …

Member Avatar for Der_sed
0
221
Member Avatar for siddhu_avula

: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 …

Member Avatar for jwenting
0
198
Member Avatar for freesoft_2000

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 …

Member Avatar for freesoft_2000
0
91
Member Avatar for Asif_NSU

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 …

Member Avatar for Asif_NSU
0
163
Member Avatar for walljoshua

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 …

Member Avatar for big146
0
108
Member Avatar for Tresa

can some please tell how can u hide whatever u are typing when typing in c++ exe. file?

Member Avatar for Tresa
0
119
Member Avatar for gagaouz

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 …

Member Avatar for alc6379
0
100
Member Avatar for JoBe

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 …

Member Avatar for Dave Sinkula
0
431
Member Avatar for rick4324528

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

Member Avatar for jerbo
0
105
Member Avatar for ancibit

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.&lt;init&gt;(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; …

Member Avatar for ancibit
0
139
Member Avatar for murphyshane

//.... int vals[] = new int [12]; vals[18] = 10; catch (ArrayIndexOutofBoundsException) { //handle error ... }

Member Avatar for jerbo
0
97
Member Avatar for URtheRhoda

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 …

Member Avatar for vgersh99
0
114
Member Avatar for Ghost

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.*; …

Member Avatar for jerbo
0
90

The End.