49,761 Topics

Member Avatar for
Member Avatar for johndory

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 , …

Member Avatar for Duoas
0
85
Member Avatar for vishalkhialani

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. …

Member Avatar for Ancient Dragon
0
73
Member Avatar for fromme

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

Member Avatar for vijayan121
0
105
Member Avatar for Bazman76

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; …

Member Avatar for Bazman76
0
145
Member Avatar for cplus2x

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 …

Member Avatar for Slate2006
0
376
Member Avatar for jenymaru08

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 ? ? ? ?

Member Avatar for hu_is_anonymous
0
140
Member Avatar for Arctic

[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 …

Member Avatar for vijayan121
0
158
Member Avatar for Kupitzc

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 …

Member Avatar for Nick Evan
0
108
Member Avatar for VersEtreOuNe

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 …

Member Avatar for VersEtreOuNe
0
123
Member Avatar for daviddoria

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

Member Avatar for Duoas
0
101
Member Avatar for C++masterinneed

[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 …

Member Avatar for C++masterinneed
0
108
Member Avatar for Nyx18

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 …

Member Avatar for Ancient Dragon
0
80
Member Avatar for Nyx18

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 …

Member Avatar for twomers
0
99
Member Avatar for Metalsiege

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 …

Member Avatar for Metalsiege
0
238
Member Avatar for nate12457

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. …

Member Avatar for nate12457
0
144
Member Avatar for FAZ3

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. …

Member Avatar for WaltP
0
85
Member Avatar for mark192

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, …

Member Avatar for WaltP
0
297
Member Avatar for guitarrick

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 …

Member Avatar for Duoas
0
117
Member Avatar for atish00

[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:'( :'( :'( :'( :'(

Member Avatar for Ancient Dragon
0
459
Member Avatar for MikeKristal

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 …

Member Avatar for MikeKristal
0
108
Member Avatar for shadowfire36

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 ?

Member Avatar for John A
0
132
Member Avatar for andyg55

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 …

Member Avatar for VernonDozier
0
171
Member Avatar for enrgpro

I have no background with programing, but would like to start learning. Can you recomend a good book to start with.

Member Avatar for Ancient Dragon
0
68
Member Avatar for gcardonav

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 …

Member Avatar for gcardonav
0
127
Member Avatar for atish00

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 …

Member Avatar for Ancient Dragon
0
559
Member Avatar for CodeBoy101

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 :)

Member Avatar for Ancient Dragon
0
88
Member Avatar for atish00

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 …

Member Avatar for atish00
0
178
Member Avatar for ShyamalShah

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 …

Member Avatar for gerard4143
0
89
Member Avatar for johnRiley

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 …

Member Avatar for vijayan121
0
131
Member Avatar for vishalkhialani

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 …

Member Avatar for vijayan121
1
181

The End.