19 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for JohnMcPherson

Hello, I work at the U.S. Department of Labor. I am a maintenance prorgrammer of C code, and the configuration management of this code in the past has been very spotty. When I took over this project, a CM tool was in place I have been doing corret checkins and …

Member Avatar for JohnMcPherson
1
312
Member Avatar for RHNation

def main(): print ('Welcome to the mpg calculator program') print() #get the miles driven using the input function miles_driven = input ("Please enter miles driven: ") miles_driven = float (miles_driven) #get the gallons used using the input function gallons_used = input ("Please enter gallons used: ") galons_used = float (gallons_used) …

Member Avatar for farmwife
0
297
Member Avatar for milkman93

Hey Everyone, I want to instantiate an ArrayList in java. I realize the method to doing this is: ArrayList<String> determiners = new ArrayList <String>(); determiners.add("A"); Where "A" is added to the arraylist once created. However, the problem I'm having is that the .add method doesn't work unless in a main …

Member Avatar for milkman93
0
2K
Member Avatar for phfilly

Hi! I would just like to know is there a way you can overwrite the main.c file in the kernel folder(dir /usr/src/kernel/main.c) in MINIX 3. I want to change some code in the file(I know the risks involved) but the problem is I can't save it. I've tried logging in …

Member Avatar for phfilly
0
228
Member Avatar for 111100/11000

#include <iostream> #include <string> #include <cmath> using namespace std; //global varibals: char entered_characters[9999]; int direction_of_rotor1; int direction_of_rotor2; char alphabet_of_rotor1[26]; char alphabet_of_rotor2[26]; char rotor1_backward(char Letter); char rotor1_forward(char Letter); char rotor2_backward(char Letter2); char rotor2_forward(char Letter2); char print(char print_char); int main() { cout << "This is enigma machine:" << endl; cout << "*NOTE:This …

Member Avatar for WaltP
0
213
Member Avatar for rahul.ch

Two doubts: 1. Placing run() inside main() generates "illegal start of expression error"? So why can't run() be placed inside main()? 2.With the above code I am getting the output as A C D B. Why B comes last is because of join(). But what I'm unable to understand is …

Member Avatar for rahul.ch
-1
225
Member Avatar for rtellez700

Hello I am running into an error after creating the jar file. I get a message stating that the main class to my program could not be found when in fact there is a main class. If someone could give me a hand and lead me in the right direction …

Member Avatar for NormR1
0
1K
Member Avatar for _Brooksy

** Having trouble running this code as the compiler keeps having issues with the method 'public void mannipulate()', I'm new to java so forgive my ignorance, but I've been trying to rearrange everything in every which way to please this thing and its just not turning out right. I'm sure …

Member Avatar for JamesCherrill
0
305
Member Avatar for ThomsonGB

I am trying to parse main(argc, argv[]); and i need to look at individual characters with in the strings pointed to by *argv[]. I though of a string as an array of chars. This builds fine but causes an error in execution. So what is a simple and straight forward …

Member Avatar for ThomsonGB
0
1K
Member Avatar for Ntropy

Hello there java gang. I've written a program which basically checks the dates that i have written for the program in question and then validates it against a set of rules, using arrays to ensure that what a user enters is valid. So for example, you can have 1,(day) 5,(month), …

Member Avatar for JamesCherrill
0
236
Member Avatar for hackit

i want to make a program that contains two main classes and they call each other. [CODE]class Main1 { public static void main(String arg[]) { for(int i=0;i<5;i++) System.out.println(i); Main2 m1=new Main2(); } } class Main2 { public static void main(String arg[]) { static int j=0; for(int i=0;i<5;i++) System.out.println(i); if(j==3) break; …

Member Avatar for hackit
0
178
Member Avatar for SMITA6076

[B]For the error and my question, skip to the bottom. I just posted all of the code in case it's needed.[/B] [CODE]/*********************************************************************************** * * File: Customer.java * * Author: Austin Smith * * Date: 04/04/2011 * * Description: The Customer class handles all client information * such as name and …

Member Avatar for SMITA6076
0
239
Member Avatar for DJSAN10

If the main() takes 3 arguments i.e. int argc,char * argv[],char *env[] and SINCE C DOES NOT SUPPORT FUNCTION OVERLOADING ,y does the c compiler does not give error for simply void main() //that is no arguments at all OR void main(int argc,char *argv[]) //2 arguments

Member Avatar for DJSAN10
0
192
Member Avatar for Rickay

I am trying to make a reference program that you can use to access any element of the periodic table based on its name, symbol, atomic number, or atomic mass. It is more than one file, and I need a way to return to main if the user wants to. …

Member Avatar for dylank
0
237
Member Avatar for AaronLLF

I followed through a Java/LWJGL n lloydgoodall.com for a first person camera. There were about 33 errors that I fixed, though I get a message in the Eclipse console "java.lang.NoSuchMethodError: main Exception in thread "main" " Here is my code: [code] import org.lwjgl.Sys; import org.lwjgl.opengl.Display; import org.lwjgl.opengl.GL11; import org.lwjgl.input.*; import …

Member Avatar for kramerd
0
656
Member Avatar for Sunshineserene

Hi, I need to do a file read and extract all the numbers in the text file to be used in my java program. However, I'm having some problem with the try and catch statement. Must the try and catch statement be in the main loop only? Can't I used …

Member Avatar for Sunshineserene
0
179
Member Avatar for aikiart

Good day, I'm having problems seeing how the recursion is working with this program. I've traced it but I don't understand why after if(num >0) is false it returns to the statement following the last function call and then seems to start the recursion again, but backwards? What I see …

Member Avatar for aikiart
0
104
Member Avatar for Sunshineserene

I have a program with arrays declared in the main function. However, when I want to use that array in my init() function, it doesn't work. May I know what must be done so that I can use my arrays in the init() function?

Member Avatar for NormR1
0
234
Member Avatar for petee1302

Hi everyone, Apparently I'm very bad at this whole programming thing, but, nevertheless, I am currently in a CPS course and in dire need of assistance! I have 3 objects set up: TwoNumbers, TwoNumbersTester, and Test. When I build the code, it's all fine. When I run the code, though, …

Member Avatar for petee1302
0
276

The End.