49,761 Topics
| |
Hi, I have to write a program that creates a polynomial with n coefficients and performs different operations. eg. 3x^2 + 5x + 1. This may be defined as poly P(3) i.e p is a 3rd order polynomial. the coefficients may be set as double Coef[3] = {3, 5 , … | |
Dear All, I am currently doing my college project and daily I come across challenges for example: How do I make the dos window cover the full screen ? How do I change the font color in dos ? I think one needs to access certain libary functions for this. … | |
Can any 1 brief me abot, what static code analysis is. And few links, where i can get freeware or open source codes for such analysing tools | |
Thanks again. I've tried implementing the following code in Visual c++ 6: [code=cpp]#include <iostream> using std::cout; using std::cin; using std::endl; #include <cmath> int main(){ int binary, n; double temp, total; total =0; cout << "Please enter the binary number: "; cin >> binary; n = floor(log10(binary)) + 1; for(int i=1; … | |
Candy Machine Simulation Write a program to simulate a candy machine.Your machine offers candy for 75 cents, gum for 50 cents, and chips for $1.You should ask the user repeatedly which of the three items she wishes to purchase, or whether she wants to quit.If she chooses to purchase an … | |
Please help me how you will make a program that using structure with a structure ?? example please struct data { char name; int age; } how will you make your structure be in within structure ??? and please kindly explain what this mean ppre->link=ploc->link ? ? ? ? | |
[code=cpp]/*I've actually located the segmentation fault location, I believe it is because I am trying to declare one array memory location equal to another when they are in seperate memory segments. However, if this is the case I have no idea on how to correct it. Here is my code … | |
I'm in a CS class in college now, and it's in C++. I have done all the things we're covering this semester... but in Java. I'm trying to write a basic program that uses a 3d char array to store the last names of passengers in an airplane, but when … | |
I'm making a program that is supposed to store the circles in a file, each circle should have an id and a radius. after i Add some circles to the file i need to open it again and search for a specific Id to display it. Here's what I've done … | |
Is there a way to interpolate between RGB values? I have a set of values that I want to map (linearly or otherwise) to colors from a color_min RGB triple to a color_max RGB triple. Since RGB is not "incrementable", how would I do this? Thanks, David | |
[code=c++] bool list::remove (char * key) { char id[100]; cin.get(key, 100 ); cin.ignore(1, '\n'); //cin >> key; //remove data from the list if it exists node * prev = NULL; node * curr = headbyName; while (curr) { curr->item.getName(id); if(strcmp(key, id) == 0) { if(!prev) headbyName = curr->next; else prev->next … | |
what im trying to do is read in a data from a file into 4 different arrays then also read in the same data using array of structs. the assignment is to show that we know how to use both methods of reading in and sorting the data. i have … | |
what i have to do is read in a maximum of 10 animals from a file (one animal per line) but if there are more than 10 animals in the file im supposed to ignore the rest and only read in the first 10. before i start to read in … | |
Hey everyone.. I'm having a little problem with something I'm writing for a class.. I'm supposed to use while and a nested IF statement in the solution, but every time I run it I get the following back: [quote]Run-Time Check Failure #3 - The variable 'A' is being used without … | |
I'm getting 3 unresolved external symbol errors. I think it's probably syntax but I can't seem to find it. This is a class I was supposed to write based on the professors specifications. The header and implementation file are mine, while the driver file cannot be edited for this assignment. … | |
ok I got this far in the code but I can't seem to get a person to enter an age and the program to return the info of those with the same age. I think this is what I need to use...or at least something like this on my code. … | |
When I click on the exe file to open it up via a folder or my desktop etc... it will show a black cmd window for about half a second and then close, however if i find the directory of my exe through cmd and then run it that way, … | |
Lost again...Just trying to "tie" a header file to a .cpp file, but I keep getting a 'need ;' before '{' ..... in my .cpp file at LIST::LIST() { x = 0; } Here are both files that I am fooling with: [CODE=C++] #ifndef LISTS_H #define LISTS_H #include <iostream> using … | |
[CODE]corr[8]="pizzaboy"; error-- cannot convert char* to char corr[]="pizzaboy"; error-- char has zero values corr[0]="p" corr[1]="i" corr[2]="z" ----- syntax error corr[8]='pizzaboy' ------- char const can have 2 chars [/CODE] Is there any way to input:'( :'( :'( :'( :'( | |
I took out a lot of code, hence all of the variables you can't see, but for some reason, this part is the only one thats screwing up. When you enter zero, its supposed to "cout" a phrase that you don't have money, but when I run it, it tells … | |
i have done some coding back in '99 in visual basic, and i remember there a command to excutse a message box to input data . is there a similar function in C++ to excute a message box for input in a windows os ? | |
input file: 1 0 0 2 1 0 0 2 1 I would like to produce this in a 3x3 array on screen. My code: [code] #include <fstream.h> #include <stdlib.h> int i, j; int matrix[3][3]; int main () { ifstream inFile; inFile.open("input.txt"); if (!inFile) { printf ("Unable to open input … | |
I have no background with programing, but would like to start learning. Can you recomend a good book to start with. | |
Hello guys, how are all you doinbg ? Well I just created this program to cound 24 hours. The program runs fine but my only problem is when I ran the programs i get the following [inlinecode]0:0:0 4469690:0:1 4469690:0:2 [/inlinecode] Where is the number 446969 coming from ? I am … | |
My project is to build a hotel menu and billing program. The problem is I have to use user defined functions to do it. 1st Function [code=c++]int password(char usr_name[8], char pwd[]); { int j=0,k=0,i=0,m=0; corr[8]=pizzaboy; for(i=0;usr_name[i]!='\0';i++) { if (usr_name[i]=corr[i]) n=1; } else n=0; po[5]=qwerty; for(j=0;pwd[j]!='/0';j++) { if (pwd[j]=po[j]) m=1; else … | |
I'm new to C++ and I'm working with the Dev-C++ complier and I'm wondering, Is there a way to change the consoe app font? I would also like to know if more than one font can be used simultaneously? thanks :) | |
Guyz I have again got a problem with functions. [ICODE]"" Write a function to input matrices"" [/ICODE] Or how can I input using fuctions ?? is it possble ?? so far I have developed a few lines. [CODE] //fuction to input a 2D-array. int multi_array(int r , int c)//r is … | |
Ok So from many people information. I have made this programe. But i am not able to use input operater overloading. So please help me in this. An also tell me how to make this programme simple. Once again thanks a lot to push me to do my homework on … | |
Hi all, I've been searching for hours but i can't find any solutions so i hope someone can help... Is there any way of proving that the += operator is more efficient than the + operator... i.e. A += B instead of A = A + B I'm hoping to … | |
I have learned the basics of c++ and found out that different c++ compilers behave differently especially when it comes to errors. I would like the community to advice as to which compiler is the most popular and if it can be used with .net so that once I develop … |
The End.