No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
19 Posted Topics
How can I change my program's icon for anyone who uses the program? Obviously I would have to include the .ico file with it, but beyond that, I'm stumped. | |
My compiler won't pause on getchar();. I have Dev C++ 4.9.9.2 and if I put getchar(); at the end of the program, it doesn't stop, and the console window still exits. It still exits when I assign a variable to it c = getchar(); Is there another way to pause … | |
I've been looking over classes, but I just can't understand a few things. 1) Why would you make variable private and use functions to set and read them? Whats the benefit? 2) Since I don't know what the benefit of making variables private, whats the point of using a class … | |
Often in a code snippet, I will see [code] printf("%d %2d %3d", i,i*i,i*i*i); [/code] What does putting the numbers in front do, since it works the same without them? (ie) [code] printf("%d %d %d", i,i*i,i*i*i); [/code] | |
I'm trying to mail a newsletter to a list of people, but I get an error every time it tries to mail. Anyone know what I'm doing wrong? [code=php] <?php $file = fopen("upload/newletter.html", "r"); $sub = fopen("to.txt", "r"); $x = 0; $y = 0; while (!feof($sub)) { $names[$x] = fgets($sub); … | |
I want to download Fedora (Red Hat) Linux, but there are a ton of files on the websites. Do I download some? one? all? Is there a way to download them all without clicking all of them? And then, after that, how do I install it?, I want to partition … | |
I understand what pointers are, but I don't understand why they are useful. I have read many tutorials about pointers, and yet I still don't know why someone would want to use one. Could anyone explain it to me? Or give me a link to something that explains it well? … | |
I'm trying to email to an array of subscribers to a weekly newsletter. Whenever I try though, I get an error "Bad parameters to function mail()". Heres the loop I'm using to mail: [code=php] $x = 0; $y = 1; while ($x <= $y) { mail($names[$x], "Hey", "Whats up?"); $x++; … | |
I'm using Dev C++, and I want to compile my program into a program usable on macs. Can I do this from Dev C++, or do I have to use a different program? | |
I tried searching the forums for this, but couldn't find anything. If I were to make a career out of computer programming, which would be better to learn, Java or C/C++? | |
I'm trying to pass an array to a function for use, but it won't compile, it gives me the error: >Type error in argument 2 to 'getMove'; found 'int' expected 'int *' It is an int array, and it won't let me pass it. From what I can guess its … | |
I'm trying to write a program to reverse a string, letter by letter. This was my latest attempt: [CODE] #include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { char oldMsg[100], newMsg[100]; int cd = 12, cu = 0; strcpy(newMsg, "Hello World!"); while (cd > 0) { newMsg[cu] = oldMsg[cd]; cu++; … | |
If its bad to use system("PAUSE");, then is it bad to use any system commands? Such as system("title x"); or system("color 4f");? If it is, is there another way to title the program? | |
I wrote this code to produce a fibonacci seqeunce to a cretain number. However, when you get to a certain number, it starts producing negative numbers, and I don't know what to do. [code] #include <iostream> #include <stdio.h> using namespace std; int main() { long lMax; lMax = 0; long … | |
I want to use a function to get either the number of seconds or milliseconds since midnight, it doesn't matter. Does anyone know of a function that would give me this? | |
I'm starting to learn C++, and I wrote this program as a test: [Code=c] #include <iostream> #include <fstream> using namespace std; int main() { char *cString; ifstream File("file.txt"); File >> cString; cout << cString << endl; system("PAUSE"); return 0; } [/code] And when I try to run it it gives … | |
I am trying to write a program that allows the user to enter an ID number, and then the program opens a txt file with the ID information, but the ifstream part isnt working, I know its because I put a variable in, but I dont know how to make … | |
I keep looking at this code, and cant find out the problem... I made this as part of a library of math functions. It asks the user to enter the number of numbers to subtract, then enter them. It should work, but for some reason doesn't. [code] void sub() { … | |
I cant get my function code to work. Its should return an average of however many numbers are entered, but it always returns 775863 no matte what... can anyone tell me whats wrong? [code] #include <stdio.h> int avg(int av[], int y, int x, int z); int main(){ int x=0; int … |
The End.