49,757 Topics
| |
Right, you're going to think I'm crazy but is Association like "Has is" For example: I have 2 classes, Teacher and Classroom, to create association would be: Teacher has a Classroom? Thanks | |
Please help, I don't know why it is not reading the file. I am working in VS C++ 2008, I saved "input_data.txt" in the header files, see below. What is wrong? #include <iostream> #include <fstream> #include <ctime> #include <cstdlib> #include "input_data.txt.h" using namespace std; class Node { public: int x; … | |
how to get string from other function? i tried this , but come error... i using Visual Basic C++.... [CODE] void main() { char name[51]; name=NAME(); } int NAME() { char names[51]; names="john"; }[/CODE] | |
I would like to implement a method to add,delete an item on a order list, and print the order total for an order. The attributes are part_number,part_name,part_price. Please give me an idea of how it is done | |
The code is evaluating a expression tree. My issue is on line 57 when I try to dynamically allocate an array to be used as the nodes in the expression tree, the compiler gives the following error: tree.cpp(58): error: no suitable constructor exists to convert from "ExprNode *" to "ExprNode" … | |
The program runs but has a logic error how can I fix it? and I need to finish the header block on the function, but I don't know how to, can anyone help [CODE] #include <iostream> using namespace std; // Function prototype bool searchList(long [], int, long); // Constant for … | |
can somebody help me with this program?? i have to program a matrix with n column and n row and it should be able to find a path moving like a horse in chess game(L) that touch every point of the matrix once. the program consist in enter the location … | |
// Tuba.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <stdlib.h> unsigned char** pgmRead(char *fileName) { unsigned char **pixel; int versiyon; int yukseklik; int genislik; int griSeviyesi; char yorum[256]; int head[3]; char c1,c2; char ch; unsigned char *block; int i,j; FILE *inf; inf = fopen(fileName, … | |
Hi, this is one of my hw problems for the week and having trouble writing this code.-- QUESTION: 1. Create a program that will generate a 10 question math quiz for single digit addition. Your program should create 2 random numbers in the range of 0 – 9 and then … | |
Hello! May I know about Double Queue with complete examples. thank you. | |
This is basically my code. It says build succeed, but I get nothing. What am I doing wrong. The user inputs a sentence, for example, Hello. (I've taken out other parts such as return LOWERCASE, return DIGIT, and what would happen in those cases for ease of reading). The program … | |
I have a 2D vector of different values. It could be text or numbers. I need to be able to see what is in the vector and to do something depending on what is in there. How do i access each element of the vector and add to a temp … | |
Hello all, I'm currently using Windows Vista and Visual Studio 2008 to develop my code. I'm working and a very big project and I'm looking for a good profiler for performance analysis. Any recommendations? It would also be nice to keep the solution as low cost as possible (free is … | |
Please Help I want c or c++ code to solve 8 puzzle problem using depth first search and breadth first search and each search print out cpu time and memory space of the queue | |
Hi, I'm trying to encrypt a simple .txt file. What I want to do is is described by the function definitions. I want to change all my characters in the .txt file to lower case and then convert any digits found into *. I've done this before in the past, … | |
so i'm stuck in creating a do/while menu doing this. menu option 1 - use the for loop menu option 2 - use the while loop menu option 3 - use the do/while loop in each option, print the numbers from 1 to 10 I made my functions like this. … | |
[code]#include <iostream> using namespace std ; class Singleton { public: // Implement the logic here to instantiate the class for the first time by validating the // member pointer. If member pointer is already pointing to some valid memory it means // that the first object is created and it … | |
[COLOR="Green"][B]salam i m new here. i m student of MIT. the basic problem is with that i cant understand the statement of proagram that what i have to do in it. and theoratical i know what is cin, cout, headerfiles etc but not very much. so i ve to submit … | |
I am writing a game code and I keep getting these erroes 359 E: Game.cpp redefinition of `void PlaceYourBet()' 155 E: Game.cpp `void PlaceYourBet()' previously defined here can anyone help me out with these errors I know it must be simple. | |
Hey there, I'm taking a C++ class and got a two staged assignment to hand in soon. I'mhaving troubles with it and was wondering if anybody could lend me a hand? We are to design and implement a web forum in C++. It is supposed to be a stand-alone application, … | |
I was wondering if it was possible to use c++ to associate a specific icon with a custom file type. for example, I create a file with fopen(testfile.rider, "wb"); It creates a file with an extension of .rider, but it has the default unkown file type icon. Is there a … | |
I was running into run time errors, and stripped down my code to isolate the problem. From that I was able to write this little piece of code to demonstrate my issue: [CODE] #include <windows.h> class test { private: int a; public: test(); void run(); }; test::test() { a = … | |
It has no errors or warnings but nothing is working what could be the problem and the assignment says that I need to a finish commenting the function header blocks. ( i don't know what that is and I don't know if this is the reason that it is not … | |
i got a problem on get data from other function, i know can use a return... but i forgotten how to code the return.... can show me a example of source code ? [CODE]void main(){ perform data() //how can i get the "name" from data function?? } int data(){ read … | |
Hi all, I now using Visual C++ (Visual Studio 2005) for my project. i face some problem in set the maximum length for my edit control(text box). i have 3 edit control in the same dialog. i want set the maximum length for each edit control = 5. following are … | |
imtrying to do a math calculation that involves multiple math operation ex((a+b)*(sin(a)/sin(b)) something like this but whenever i execute the code its giving me 3 answers this is the code hoping you could help me it very urgent though thanks!! [CODE]#include <iostream.h> #include <math.h> #include <string.h> int nVar = 0; … | |
hello guys!I would like to give a little help for a problem which stops me from my project. take a look plz...<br> [CODE] void traverseDir( string dirname ){ string str; DIR *pDIR; struct dirent *entry; pDIR=opendir(dirname.c_str()); while((entry = readdir(pDIR)) != NULL ){ if( isDir( dirname.c_str() ) ) { if( strcmp(entry->d_name, … | |
Helllo,,please,help me,to write programm add balance,delete balance in search tree, TreeNode *AddBalance (Type x,TreeNode *root,int *grow) {int incr; *grow = 0; if (!root) {root=(TreeNode*) GetPlace(); if (root) {root->left=root->right=0; root->value=x; root->balance=0; *grow=1; } return root; } if (x<=root->value) {root->left=AddBalance(x,root->left,&incr); if (incr) {switch(root->balance) {case 0:root->balance=-1;*grow=1;break; case 1:root->balance=0;break; case -1: switch(root->left->balance) {case -1:root=Rebuild_L1(root);break; … | |
Hey i was trying to do a coin simulate that tells you how many heads / tails it appears and that every time heads pops up you gain $2.00 (win) and whenever tails pops up (lose) you lose $1.00. My program does not print the winnings i do not know … |
The End.