49,757 Topics

Member Avatar for
Member Avatar for Phil++

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

Member Avatar for boblied
0
150
Member Avatar for Gem74

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

Member Avatar for Fbody
0
237
Member Avatar for rino699

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]

Member Avatar for Tom Gunn
0
130
Member Avatar for antonywere

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

0
54
Member Avatar for mike.bauer

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

Member Avatar for mike.bauer
0
227
Member Avatar for rookanga

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 …

Member Avatar for Fbody
0
124
Member Avatar for nick30266

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 …

0
79
Member Avatar for firtina

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

0
55
Member Avatar for ninatech9

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 …

Member Avatar for Skeen
0
2K
Member Avatar for kochan
Member Avatar for jbennet
0
47
Member Avatar for EastJohn

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 …

Member Avatar for Skeen
0
137
Member Avatar for AdRock

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 …

Member Avatar for AdRock
0
227
Member Avatar for don0369

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 …

Member Avatar for potatosoftware
0
128
Member Avatar for adam20091

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

Member Avatar for zohal
-1
105
Member Avatar for jv44heinzbar

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

Member Avatar for Skeen
0
354
Member Avatar for jlouang

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

Member Avatar for IT seeker
0
173
Member Avatar for madankumar

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

Member Avatar for gurucode
0
932
Member Avatar for IT seeker

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

Member Avatar for IT seeker
-2
475
Member Avatar for Grim279

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.

Member Avatar for Grim279
0
95
Member Avatar for Coodle

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

Member Avatar for abhi_elementx
0
143
Member Avatar for riderrocker

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 …

0
90
Member Avatar for dalcocer

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

Member Avatar for abhi_elementx
0
101
Member Avatar for Nika01
Member Avatar for rookanga

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 …

Member Avatar for restrictment
0
118
Member Avatar for rino699

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 …

Member Avatar for jbennet
0
72
Member Avatar for Alice86

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 …

0
44
Member Avatar for wannabeengr

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

0
65
Member Avatar for sirus23

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

Member Avatar for sirus23
0
96
Member Avatar for Nika01

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

Member Avatar for Clinton Portis
0
154
Member Avatar for Mclovin1234

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 …

Member Avatar for jonsca
0
91

The End.