49,757 Topics
| |
Please spot the errors and right the correct code back . Thanks in advance amit kumar[code]#include<stdio.h> #define max 10 typedef struct { char entry[max]; int top; }stack; int stackfull(stack *s) { if(s->top==max) return 0; else return 1; } int stackempty(stack *s) { if(!(s->top=-1)) return 0; else return 1; } void … | |
My code is an expression tree program, in which I make treenodes pointers and push them in the end all into the 1st spot of a stack, in which is declared in my header file of the program. I wipe all the treenode pointers with a recursive traversal. Is this … | |
[B]Hello![/B] I am writing a c++ code for displaying a 3D cube. I have some small problems with arrays. I want to initialize just some interval of array. Example: [COLOR="Green"]int array[10][10]=0; //now I want to initialize just an interval array[0][5] TO array[0][8]=1;[/COLOR] ___________ I know that in place where the … | |
I wonder something about finding a specific character in a string. What I am trying is to find "*" and if that character is found in the string, I will write "Found" to a file. When running the code below. All this is happening but the same thing is happening … | |
An International market maker seeks C++ and C# developers to build out proprietary trading applications in both a windows and Linux environment. This firm has been growing steadily over the past couple years and have open development roles on their Market Data, Connectivity, Business Intelligence, GUI, Data Analysis and Speed … | |
Hi all!! I'm using stl map to store some data here is the example: [CODE] struct MapKey { int i, j; void Set(int pI, int pJ) { //this guarantee that i is always lesser than j if (pI < pJ) { i = pI; j = pJ; } else { … | |
Hello...i m nikhil i m student of comp engg. Nw we are doing work on project..but we hav some problems in it..i request u ..plz help me in my project i send u..my project nmae..plz give me fast reply...m waiting for u r reply.... MY SUBJECT QUESTION IS Que: My … | |
Hey, I'm trying to do a class for a games program, basically it will allow me to enter games into the class. Here is the code (It won't work) [CODE]#include <iostream> #include <windows.h> using namespace std; class Games { private: char game_title; char game_cost; char name; public: void set_values(char name, … | |
My code so far opens a text file in a particular format and reads in the data into a structure called salesRecord. There is no problem there. The problem arises when I write the data to a new binary file. Here is the structure: [code=CPP] struct salesRecord { int custNo; … | |
I need some help passing a array of integers into a hash table by chaining. So if the array is filled it that location it will go to a linked list of the index. any ideas on how to get this done. This is what i have so far. [CODE]chainFunc(int … | |
[code=c++]class StripChartWindow : public PegDecoratedWindow { public: StripChartWindow(const PegRect& Rect, const PEGUINT TitleId); virtual ~StripChartWindow() {} virtual PEGINT Message(const PegMessage& Mesg); private: PegStripChart* mpChart; PegStripChart* mpChart2; PEGUBYTE mID; PEGUBYTE mSin; PEGUBYTE mID2; PEGUBYTE mSin2; };[/code] This is the part which is givin me errors as below... error C2143: syntax error … | |
I've written a program like the follow: [CODE]int main () { . . . . ifstream file1; ifstream file2; ofstream simiralities; simiralities.open("P(0)_P(1).txt", ios::app); file1.open("test1.txt", ios::in); while (!file1.eof()) { . . . file2.open("test2.txt", ios::in); while (!file2.eof()) { . . . . } file2.close(); } simiralities<<number; file1.close(); simiralities.close(); return 0; }[/CODE] the … | |
| |
I am currently having problems with my getline in main. Whenever I use it, it prints out the last word in my input file twice. I do not know how to get rid of it. Any help is appreciated. [B]Input file:[/B] noon dog race car cat mom bob [B]Current Output:[/B] … | |
I am a student in a computer programming class. I was instructed to write a program that would allow the user to input numbers and the program would output the sum of those numbers. I wrote the program up but keep getting this error message: error C2447: '{' : missing … | |
hi there, i just want to know what data type i need inorder to store a binary word eg. 10010111 | |
I am having problems completing this program. I have included my notes, and stated current problems in the beginning. Please help. I have no idea what I am doing. This is all I have accomplished in 4 days! I am new to programming, well relatively, it was nearly 17 years … | |
[QUOTE]THe problem is supposed to give the recsive answer and the loop answer. The recusive anwer is always giving 0 - as its answer.and that is inccorrect It is supposed to show the steps and so is the loop answer. Can someone plase help me[/QUOTE] [CODE]#include<iostream> using namespace std; float … | |
I have an assignment due tomorrow and I haven't being able to do it. I do not understand nothing about classes and when to use them. My assignment is: (Account Class) Modify class Account (Fig L 3.1 and Fig L 3.2) to provide a member function called debit that withdraws … | |
Hello, I have a program, let's say foo.cpp . If I do "g++ -S foo.cpp". That generates the file "foo.S" with assembly code. I would like to compare the assembly code foo.S with the assembly code generated if I put foo.S in a c program (even though there should be … | |
Hello. I`ve been given to make a program for math.After checking it.. it confuses me.I`ve been searching for a solution about my program.I hope u`ll help me with this program. | |
good day everyone there's something i've been trying to do in c++ its a program that finds the mean median and mode from a group set of data, it should use vectors to read these data from the user and then tabulate into: grade distribution class mark(x) fx i've tried … | |
I am looking at some open source code and I am a bit confused. There is an Allocator class: [code] class Allocator{ [/code] Then in another class, they have: [code] class Octree{ public: static Allocator<OctNode> Allocator; [/code] When trying to compile, I am getting: [code] error: declaration of 'Allocator<OctNode<NodeData, Real> … | |
i am doing a problem . take character dynamic of size 10.when user enter 11th element.it increment the array size to 20. when user enters 21st element array size increases to 30 and so on int main(){ char *p; p=new char []; int size; for(int i=0 ;i<10; ++) cin>>p; size=strlen(p); … | |
Ok, I am newish at programming in c++ and am doing a computer science program in school. For my latest project I have come to a bit of a dead end and was hoping for some help with loops and ignoring characters. The program is quite simple, it is a … | |
#include<stdio.h> main (){ double I; printf ("Enter the value : "); scanf ("%lf",&I); while(I<=0){ printf("**Value must be greater than 0.0\n"); printf("**Try again. : "); scanf ("%lf", &I);} WHAT DO I HAVE TO ENTER HERE? printf(" I is %lf\n", I); }[code]Hi! I create a code so that it checks if the … | |
First of all I'd like to congratulate you on the excellent community you have here. It is helpful and knowledgeable. I'm looking for a library that would allow me to make a video file (.avi, .mov, any file works) from bitmaps, or other image formats, on the mac. I have … | |
| i have an assignment to do but i'm still not good at c++programming.. the question is: -------------------------------------------------------------------------- Write a program in C++ that allows users to play the game of Hangman. The program stores a series of words in a file called words.txt, and randomly chooses one word to be … |
Hi all! I would like to use microsoft access permissions in my app. how can i do this, i used 'user level security' but when try to connect to DB in my app. Couldn't. Warm regards Sara | |
Even though I am 8 :), I WANT to make an OS. Something to be proud of. I normaly use VB but I am now starting a bit of C++ programming. Thanks , Campbell |
The End.