2,827 Posted Topics
Re: [QUOTE=espm1000;732849]Hello everyone, I am new to computer science, and thus far this semester I have not needed any help in writing a program even though I am stuck with a professor who struggles to get a clear point across. He is a great guy and tries to make sure we … | |
Re: These links might be helpful. [url]http://www.deitel.com/articles/cplusplus_tutorials/20060325/index.html[/url] [url]www.cis.gsu.edu/~mmoore/CIS3280/lectures/exceptions.ppt[/url] You need PowerPoint for the second one. | |
Re: [QUOTE=Fiery Demon;732078]Thanks :):) However, I can't get the oval, oval2, neck, eye, eyes to move up and down. I'm using the code my instructor gave me and it isn't that helpufl :S[/QUOTE] It's considered bad form to post verbatim threads on two separate forums at the same time. Read post … | |
Re: [QUOTE=GrimJack;728684]Yes, it is why I won't feel very good about the election until inauguration day. Speaking of which, I have heard that there might be a movement to make inauguration day January 1st - why let 2 weeks go by with no president (so to speak). What do you think?[/QUOTE] … | |
Re: When in doubt, write a program! It's faster and more accurate than research. I did this on Dev C++, but is it a reasonable assumption that it's the same everywhere? [code] #include <iostream> using namespace std; int main () { int a = 8 * 9 % 5; cout << … | |
Re: I don't have that much experience with making C++ GUIs. You may want to try Microsoft Visual C++ and their Forms feature. The Express version is free, but I don't know if it includes the Forms options, which is mostly drag and drop and easy to use. You may need … | |
Re: [QUOTE=c++ prog;731651]hi we have a programming assignment which computes the volume of a barrel. I don't have a compiler yet and java is not yet recognized by my computer yet because I haven't downloaded any JDK yet because I don't know which one to download...Here's my code so far...Please just … | |
Re: [QUOTE=lilnedy;731470]I attached a picture of what it should look like but just dont know how to start the thing. Back to reading more. Thanks for the advice.[/QUOTE] By "what it should look like", does this mean this is what it is REQUIRED to look like or is this somebody's advice … | |
Re: Use code tags: [noparse] [code] // paste code here [/code] [/noparse] The compiler will tell you exactly what the error is and where. Read the compiler messages closely. You'll get some warnings and an error. Read them carefully. Look at this line and see if you can find it: cin … | |
Re: Best way to handle the problem is to start commenting parts out until it compiles. Start by commenting out all the function declarations and the functions and everything but this: [code] int main () { return 0; } [/code] When that compiles, uncomment the #include statements and const declarations: [code] … | |
![]() | Re: [code] void Output(double total, int sqft, double paint, double labor) { cout << "The number of gallons of paint required is ___\n"; cout << "The hours of labor required is ___\n"; cout << "The cost of the paint is $" << paint << endl; cout << "The labor charges are … ![]() |
![]() | Re: Which line? You can either use C++ code tags: [noparse] [cose=cplusplus] // paste code here [/code] [/noparse] which add line numbers, and you can reference the line number, or you can highlight the relevant line in red. Give the compiler error too please. ![]() |
![]() | Re: [QUOTE=Nick6425fl;730341]I'm still learning about all of this...I'm sure when I look back at this post in a couple of months I'll laugh. Thanks for the reply, but what do you think that line should exactly be to make that code work?[/QUOTE] If you format/indent your code, it'll be much easier … ![]() |
Re: [QUOTE=piznut25;730248]I am a beginner and our teacher gave me this assignment. I am going to be writing some code tonight but I am having a tough time starting. should I have a seperate function to handle both manual and file input parts?[/QUOTE] [quote] At a minimum, you should include separate … | |
![]() | Re: As to the error, lines like this are illegal, where highest is defined as a string and salesSE is a double: [code] if(salesSE > highest) [/code] You can compare two strings and you can compare two integers, but you can't compare an integer and a string like that. You should … |
Re: [QUOTE=gangsta gama;729489]Thank you, ArkM. I will try what you did. The compiler I am using is Dev c++ and it is not working right now, so that is why I am writing back. I have one question though... what does setprecision do? Thank you, Gangsta Gama[/QUOTE] Best way to learn … | |
Re: [QUOTE=swbuko;729210]yea, I need to exchange x for the the number. such as 3, 4, 5 etc. Ill run a while loop to get my x,y coord.[/QUOTE] You probably need to post some code and provide an example of a run of the program, even though you haven't written the program … | |
Re: [code] getline(istream& fin, string& num_of_isbn, char '\n'); [/code] This isn't a function call. It's a function prototype already defined in C++, so you don't need to define it. Leave the variable types out. The compiler will figure out what the types are and what function to call: [code] getline (fin, … | |
Re: [QUOTE=localp;728316]i need to write a c++ function that could read in the values of a text file, but in the text file we need to eliminate duplicate values; for example we may have values like ;;;; this is a text file, and it contains the above students, there first name … ![]() | |
Re: [QUOTE=cajuninms;727983]I am now getting this error after adding "using namespace std;" to both the header and implementation: Undefined first referenced symbol in file main 3/crt1.o 1d: fatal: Symbol referencing errors. No output written to a.out collect2: 1d returned 1 exit status[/QUOTE] Post the updated code please. Last time you made … | |
Re: [QUOTE=sAeNxNyA;728304]its not a binary search tree.....just a simple binary search plz help :([/QUOTE] You still need to repost using code tags so it's readable please. Either: [noparse] [code] // paste code [/code] or below (which adds line numbers and syntax highlighting) [code=JAVA] // paste code [/code] [/noparse] | |
Re: Something times something else mathematically always depends on what the word "times" means and the units involved. Multiplying money is problematic because: $1 = 100 cents $2 = 200 cents So if $1 x $2 = $2 and 100 cents x 200 cents = 20,000 cents = $200, we have … | |
Re: What about Zane Starkewolf's robo-calls? Those deserve at least an honorable mention. [url]http://www.youtube.com/watch?v=c9_BAxI3Mik[/url] | |
Re: You have two threads on the same topic. [url]http://www.daniweb.com/forums/thread154728.html[/url] | |
Re: [QUOTE=NinjaLink;724248]Here is soe things that my compiler says. I don't know how to copy and paste, so i will type some of it manually: In function int main() 10 - no match functoin for call to 'personType::personType(const char(8))' candidates are: personType::personType(const personType&) 16 - 'firstperson' undeclared 17 - 'lastperson' is … | |
Re: The video you link is from 2000 and has this title: [B]Obama's Crime Against Humanity—Infanticide[/B] Hardly anyone had even heard of Obama in 2000. I certainly didn't watch the whole video, but what does Obama have to do with an abortion video from 2000? | |
Re: [QUOTE=kotkata;722930]Thanks for helping me. I really appreciate it. In fact, you helped me more in this than did the TAs in one hour. (She kept suggesting that I use another loop to break me out of the eighty "15"s which did not work at all) As for counting the numbers, … | |
Re: [QUOTE=bahr_alhalak;719111]i'm sorry my frind , but 'm not a student . i'm only learner . i need to know more ,about programing . i am so sorry[/QUOTE] You're not a student? [quote] SFDV3001 (Algorithms and Data Structures) Semester 1, 2008 Due date: October 25, 2008 (10 %) [/quote] Post the … | |
Re: [QUOTE=Se7Olutionyg;722082]how about the second term[/QUOTE] I've never heard of the word "Procuste". Are you sure it's spelled correctly? | |
Re: [QUOTE=clutchkiller;722922]How would you put a counter into an If statement to check if there is a specific amount of chars, Say 'x' or 'y'? Thanks[/QUOTE] Too vague. Specific number of chars in what? Some string? What are x and y? | |
Re: I get warnings, not errors on lines like this: [code] if (val1 > 16777215 && val1 <= 4294967295) [/code] [quote] [Warning] this decimal constant is unsigned only in ISO C90 [/quote] You are using && correctly. You've declared val1 as a signed integer and 4294967295 is out of the bounds … | |
Re: [QUOTE=msashley09;722099]ok another thing is...i need someone to run it if they can because it also wont display correct roman numerals/decimals...... i messed something up.[/QUOTE] Run what? I don't see any code. | |
Re: [QUOTE=Boudou;722034]#include <stdio.h> #define SIZE 16 int* biggest(int *a, int count); int main(void) { int values[16] = { 47, 17, 38, 91, 33, 24, 99, 35, 42, 10, 11, 43, 32, 97, 108, -8 }; int *p; p = biggest(values, SIZE); printf("the biggest element in the array is %i\n", *p); return … | |
Re: [QUOTE=JackDurden;722011]Im having trouble seeing this recursion function through. Say I have an 8 by 8 array how would I get the search function to "see" into the middle of the 8 by 8 array. Positions (4,4), (4,5),(5,4),(5,5). [/QUOTE] Don't know what you mean by "see into the middle of the … | |
Re: My guess is that you are supposed to have two functions, not one here: [code] int toyType::getStock(int st) { stockcount = st; return st; } [/code] You are simply returning the value you passed to the function here. Thus you really aren't "getting" anything. There's no new information. You are … | |
Re: [QUOTE=uim_1977;722051]People what do i do wrong, i'm new to the forum, but for some reason i'm not gettig any ansfers to my questions, please tell me what do i do wrong???? Thank you.[/QUOTE] You're either dumping too much code without being specific about exactly where to look: [url]http://www.daniweb.com/forums/thread153541.html[/url] or you're … | |
Re: [QUOTE=robgeek;721046] [code] double Mean(const int Data[][4], int r[][4], int c[][4]) { int Avg[5][4]; int sum=0, i; for(int r=0; r<5; r++) for(int c=0; c<4;c++) Avg[r][c]= r[r][c]+c[r][c]; return sum; } [/code] Any help is appreciated. Thanks.[/QUOTE] Here is your code simplified: [code] double Mean(const int Data[][4], int r[][4], int c[][4]) { return … | |
Re: [QUOTE=dbwalters;713225]One thing I should add is that when I try to plug in a number less than 0, I get an error. When I try a number between 0 and 1 I get this: 10(0.1) (lg 0.1) > 2(0.1)^2 -1 > 0.02 Thus this is why I pick B as … | |
Re: [QUOTE=dmanw100;720132]Is there an easy way to open an fstream using a string? My code is as follows: [CODE]bool openArray(std::string *arrayFileName, int *width, int *height,int *myArray) { std::fstream BoardFile; BoardFile.open(*arrayFileName);[/CODE] I obviously cannot use this method since *arrayFileName is not char* but is there another way to do it?[/QUOTE] Well you … | |
Re: Code tags: [noparse] [code=cplusplus] // paste code here [/code] [/noparse] You have this call: [code] guess_game(); [/code] and this prototype: [code] void guess_game(); [/code] but the function itself is this: [code] void guess_game(int N) [/code] The prototype needs to match the implementation and the function call. The function call should … | |
I have a program for which I am designing a help menu. The program allows you to add squares, ovals, and other shapes, and move them, rotate them, etc. I'm setting up some HTML pages that explain how to do different tasks. So when the user pulls down the help … | |
Re: WHICH { ? You have a bunch of them. In addition to what Sci@phy mentioned, you have a bracket problem here too: [code] void processChoice (int userChoice) { if (option == 1.0) { cout<< "How many Coca-cola would you like: " << endl; cin>> cocaout; } else if (option == … | |
OK, this is a follow-up to this thread, which I have marked solved. [url]http://www.daniweb.com/forums/thread152797.html[/url] I changed things from GIF to PNG and that seems to solve the saving issue, but there is a new issue. I'm trying to create a semi-transparent circle as an image, which can be saved. The … | |
Re: [code=cplusplus] #include <iostream> #include <cmath> using namespace std; double pif(double); //Fucntion to determine value of pi int term; //Variable to count terms int main() { cout << "Value of Pi" << " " << "Number of terms" << endl; cout << pif(3.0) << " " << term << endl; cout … | |
Re: { private: static int id; char name[20]; char age[20]; double salary; public: Employee(); char *getDepartment(); double getSalary(); void print(); }; int Employee::id = 0; int Employee::getID() { return id; } void Employee::Add(char n[], char a[], int size) { name = n; age = a; } int main() { char name[20]; … | |
Re: The spacing in your code makes it very hard to read: [code=cplusplus] #include <iostream> using namespace std; int main () { int j; int t; int p; int num; cout << " Please enter an even integer greater than 2: "; cin >> num; for ( int i = 2 … | |
Re: Define "not working". Is this a verbatim copy and paste of what the instructor wrote? What's the question? if "not working" means that it doesn't read from a file, you're right. It doesn't do that. I imagine your job is to change it so it does read from a file. | |
Re: [QUOTE=akira_shinizaki;717957]hmm an attempt....honestly, i really don't know how to write the code because functions that I know only conditional IF and increment and decrement for now. It really help me if you can show me some example of it.[/QUOTE] Focus on the easier part first, the summing of the numbers. … | |
Re: No one is going to do this whole assignment for you. Post what you have done and what you need help with. | |
Re: A 32-bit system can store from about -2 billion to 2 billion in an integer. Something like that, so 10,000,000 is within that range. A 16 -bit system can store some thing like -32,000 to 32,000 in an integer, so 10,000,000 is outside of that range. This line is incorrect … |
The End.