49,755 Topics

Member Avatar for
Member Avatar for H_beginner

I am trying to plot a graph in matlab using c++. But the matlab is only giving me an empty graph. void portfolio::viewGraph() { double value[20]; //store portfolio value double time[20]; //store time int i=0,j=1; double cash,p; ifstream in_file("transactionhistory.txt", ios::in); string c; while(in_file>>cash>>p>>c>>c>>c>>c>>c) { value[i]=(p+cash); cout<<p<<endl; time[i]=j; cout<<time[i]<<endl; i++; j++; …

0
176
Member Avatar for andrew mendonca

Working on the maze program, with '*' indicating a wall, ' ' indicating a corridor, and '#' indicating a solution path, where I must use a recursive backtracking algorithm, I cannot seem to print the '#' symbol for the solved maze. Here is my new code: #include<iostream> #include<fstream> using namespace …

Member Avatar for kal_crazy
0
249
Member Avatar for mc3330418

I need to read in sentence and then put each letter into an arraylist. When I'm done I need to out put the letter that were in the sentence and how many times they appeared. ex: hello how are you h2 e2 l2 o3 w1 r1 y1 u1 So, I …

Member Avatar for mc3330418
0
190
Member Avatar for batoul.dje

a set will be represented by the list of its components, writing a difference function set list i don't how how i do it in c++ please can u help me

Member Avatar for richieking
0
108
Member Avatar for NathanOliver

Hey Daniweb, I have recently started working with threads in the c++11 library. I started with a simple dispatch mechanism where I have a queue and that would get passed to the threads and the threads would take turns emptying the queue. Since each thread needs to share the queue …

Member Avatar for NathanOliver
0
294
Member Avatar for spritzer

how to code a program using c++ so that a customer can rent upto 3 books and how to ban that user if not returned the books. Please help.

Member Avatar for richieking
0
133
Member Avatar for jonathan710

So for my homework i needa write a code that requires me to look up on a T key and adding stuff to T values. Could someone help me plz? (ie can i set both the key and value to template type) p.s. sorry not being able to expain the …

Member Avatar for richieking
0
321
Member Avatar for gonzalez50
Member Avatar for f4fjks

Hey All! kindly please tell me how to get user input right after the outtextxy function in graphics mode. Compiler : Turbo C , Win XP here is my program: [CODE]#include<stdio.h> #include<conio.h> #include<graphics.h> void main() { int gd=detect,gm,s; initgraph(&gd,&gm,"c:\\tc\\bgi"); cleardevice(); outtextxy(100,120,"enter number here : "); scanf("%d",&s); getch(); }[/CODE] now here …

Member Avatar for Cihan_1
0
667
Member Avatar for MOKSHo

write a template for a function called total . the function should keep a running total of values entered by the user , then return the total . the argument sent into the function should be the number of values the function is to read . Test the template in …

0
150
Member Avatar for ShawnCplus

This is just a little something for those of you used to using the Eclipse IDE, it's syntax highlighting almost identical to Eclipse save a bit of enhancement. Eclipse doesn't highlight ints, octal and hex individually but DevC++ can, there are a few other things in there that promote very …

Member Avatar for Tech_1
3
381
Member Avatar for jonathan710

So I was asked to solve this question...however when i compile it, it doesn't work...could somebody tell me what's wrong and how to solve it (im guessing it's something to do with overloading since my lecturer was talking abt it just before this was given)? thanks a lot! #include <iostream> …

Member Avatar for DeanMSands3
0
265
Member Avatar for andrew mendonca

For the maze program, with '*' indicating a wall, ' ' indicating a corridor, and '#' indicating a solution path, where I have to use a recursive backtracking algorithm, I am still having trouble print the maze solution. Here is the unsolved maze: 8 12 ********** * * * * …

Member Avatar for kal_crazy
0
310
Member Avatar for johans22

i need to be able to delete registry key in windows 7 and win XP using c/c++. Is there any example code that does it? I modified a VB code that I wrote for win2000 and it partially works on both OSs with error messages. I need to start fresh.

0
45
Member Avatar for PratyushTheGreat

We get the co-ordinates of a projectile at t1, (a,b) at t2 (c,d) at t3, (e,f) and so on as required. Write a program in C++ to calculate equation of trajectory of projectile..

Member Avatar for Rahul47
0
130
Member Avatar for moon.fall.58

I am having difficulties with the binarysearch function. I managed to get sorting and binary search done. However when I search a name it has to be the entire name for example Allison, Jeff. However, I want to know how to search just the first or last name of the …

Member Avatar for Ancient Dragon
0
180
Member Avatar for Echo89

This is a function that generates a string of random characters to the length that you specify.

Member Avatar for 5n0wn1nja
0
7K
Member Avatar for Elias_2

A hospital desires to computerize its daily parking activity. The parking opens its doors from 8 AM till 8 PM. Therefore; they bought a device to issue cards, at the entrance gate upon the visitor request, showing the arrival time. Upon leaving the parking the same card is inserted again …

Member Avatar for freeviewman
0
125
Member Avatar for ameen994

[Click Here](https://www.dropbox.com/s/3qd8ws32zf7roqm/Code%20Skeleton.cpp) Code Skeleton. [Click Here](https://www.dropbox.com/s/iw1me7wozongm7l/HW1%20Description.pdf) HW Description.

Member Avatar for kal_crazy
-1
153
Member Avatar for prettyknitty

Hello, I was wondering what a second pair of eyes (or several) might have for opinions on this code? This program is supposed to store a user generated array, and functions which tell the highest, lowest, etc. Mainly, I need help with the "set cell" part, which is supposed to …

Member Avatar for NathanOliver
0
216
Member Avatar for HenryR7

#include <iostream> #include <iomanip> #include <string> #include <cstddef> #include <cstring> #include <fstream> #include "IntStack.h" using namespace std; int main() { char c; ifstream inFile; string filename; cout << "Enter the filename " << endl; cin >> filename; inFile.open(filename); IntStack stack(50); if (!inFile) //file could not be opened { cout << …

Member Avatar for HenryR7
0
165
Member Avatar for cambalinho

i know: - &varname is the adress of varname; - *varname is the value of adressed variable. but: void *Vvariant=NULL; friend ostream& operator <<(ostream &os,const variant2 &obj) { os << obj.Vvariant; //how can i get the value of adressed variable? return os; } how can i get the value of …

Member Avatar for cambalinho
0
124
Member Avatar for olabamiji14

please i need who can explain how i can develop a copyright detection sofware for me

Member Avatar for mike_2000_17
0
129
Member Avatar for HenryR7

intstack.h cannot be changed class IntStack private: int *stackArray; // Pointer to the dynamically allocated stack array int stackSize; // The stack size int top; // Indicates the top of the stack public: // Constructor IntStack(int); // Destructor ~IntStack(); // Stack operations void push(int); int pop(); bool isFull() const; bool …

Member Avatar for HenryR7
0
148
Member Avatar for andrew mendonca

In this program, I am trying to print a solution for the maze with '*' indicating a wall, ' ' indicating a corridor, and '#' indicating a solution path. I am using a recursive backtracking algorithm in this program. For instance, here is a small (8-by-12) maze: 8 12 ********** …

Member Avatar for kal_crazy
0
1K
Member Avatar for leenana

Write a recursive function, vowels, that returns the number of vowels in a string (character array).no global variables are allowed ??

Member Avatar for gerard4143
0
255
Member Avatar for owenransen

I have a project created with VC2010 and the initial layout is almost ideal, it has a CFileView and a CClasView in a tabbed bar on the left and a CPropertiesWnd on the right. But for my project these windows need to say where they are and not be moveable, …

Member Avatar for owenransen
0
200
Member Avatar for Qutbuddin
Member Avatar for kakilang

below is the simple source code #include <iostream> using namespace std; int main() { cout<<"Hello"<<endl; system("pause"); return 0; }?? how to let program play some music when the program print the word "Hello"?? Let's say the song file name is "hello.mpg".

Member Avatar for 4reebahmedkhan
1
10K
Member Avatar for mc3330418

I am trying to read in a word to a string and then output the letters, in alphabetical order, and count how many instances of that letter. array a 2 r 2 y 1 #include "ArrayList.h" #include <iostream> #include <string> struct ItemType { char letter; int count; }; int main() …

Member Avatar for rubberman
0
108

The End.