No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
25 Posted Topics
Re: Google is your friend. The first C++ test I took looked like this, but my professor didn't tteach half the stuff. He expected us to read it from the book on our own. Answer what you can and google the rest. | |
Re: You are getting the out of bounds from line 8. Before you try to length() - 1, do a check to see if length == 0. If true, return false. | |
Re: javascript != java; My advise for learning java is to start with the basics and build from there. If you have programmed in some other language, then you should be able to get caught up quickly. There are a lot of fundimental things about java thaat haven't changed over the … | |
Re: I just wrote an annagram program simmilar to yours. My program didn't do the chopped up forms of a word. It only used the exact number of letters entered by the user. I wrote the input words into a struct that contained two items. The first was the word as … | |
Re: you could try a while loop that takes in a character from the user. while((scan.next()).equals(" ")) i dont know if the .equals() would work, but you get the idea? | |
Re: void functions do have a return type, they return void. In some languages, you can say "return void" others you can't. | |
Re: what is the output of the error message you are getting? Does it compile? | |
Re: Do you have a specific question or do you expect us to run and debug your code? | |
Re: MIT, Stanford, UC Berkley, UCSD, University of Michigan... your local community college. Any one of these would be a good start. The C Programmin Guide by Dennis Ritchie would be a good start to understanding C and then working your way up to C++. | |
Re: You could declare a char[BUFSIZ]. It is a max length your system can use. Not exactly what you are describing, but it would get the job done. | |
Re: "Right, so first thing: where are the calls to the getters? Surely they are implicitly called, but how? I don't see anywhere." The class Employee was written with getters and setters, but the author didn't use the getters. The variables "private String name" and "private String jobTitle" have the scope … | |
Re: your link isn't working for me. I don't see myself spoonfeeding you the answers but I can take a look and help you if you have a specific question. | |
Re: I don't know about MIPS Assembly, but in SPARC Assembly move the two registers or numbers into %o0 and %o1 and call .mul The result will be returned in %o0, move %o0 to %o1 you can then call printf after you have set a string into %o0. String: acsiz "%d\n" … | |
Re: On line 112, try to put a (int) after the "=" . The program is expecting an int in this case. Try the same for your other errors when they want a float or a double. Just cast it as that type. It is trying to warn you that you … | |
Re: Ì don't think this is the right website for you if you want people to "provide" you the code. If you can't even attempt at trying to solve the problem, you should switch majors. | |
Re: You could just combine the two arrays into a new array and then sort it. When you are going through both of you two orginal arrays, some kind of sorting comparison must be done to combine the two into the new sorted order. I don't know if this helps, but … | |
Re: .global helloWorld .section ".data" str: asciz "hello world!" .section ".text" helloWorld: save %sp, -96, %sp set str, %o0 call printf, 1 nop ret restore | |
Re: To answer your question about how to use argc and argv, argc is an int. It represents the number or strings that are seperated by white space in the commandline. argv is an array of char pointers or strings. The values of each index is the information entered on the … | |
Hi, my code prints out the number of times a letter is typed. I can get it to print out the correct info, but when it deals with a white space, it will print out the list for every white space. how can I deal with this? [CODE] #include <iostream> … | |
Hello, part of my project I'm working on needs to have me count the amount of letters in a file. This is what I have so far. Any one help? [CODE] #include <iostream> #include <fstream> using namespace std; int main () { char c ; // start with a blank … | |
Part of the assignment I'm working on is to display random letters between my good letters to encode text. Right now I can make it display random numbers. How can I change this to out put random letters? [CODE] #include <iostream> #include <fstream> #include <ctype.h> #include <ctime> #include <cstdlib> #include … | |
I am trying to do a command line switch with an if statement. The problem I am running into is when I am using a letter, it wont recognize it. When I use a number, no problem. I think there are a few different ways to solve this. Can anyone … | |
I am trying to use an array that can change in length by the number in the command line. Arrays must be constant at the time of declaration. Can anyone help? [CODE] using namespace std; int main (int argc, char *argv[]) { int nulls=atoi(argv[2]); int arry[nulls]; } [/CODE] | |
I'm trying to open a txt file using command line arguments in Visual C++. I know you need argc and argv[] in the main. What would be an example you would type into the text field on project>properties>debugging>command arguments? How would you display the text on screen? After reading the … |
The End.