49,755 Topics
| |
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++; … | |
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 … | |
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 … | |
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 | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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> … | |
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 ********** * * * * … | |
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. | |
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.. | |
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 … | |
This is a function that generates a string of random characters to the length that you specify. | |
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 … | |
[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. | |
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 … | |
#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 << … | |
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 … | |
please i need who can explain how i can develop a copyright detection sofware for me | |
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 … | |
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 ********** … | |
Write a recursive function, vowels, that returns the number of vowels in a string (character array).no global variables are allowed ?? | |
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, … | |
How to convert Text File to C/C++ File to include folder | |
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". | |
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() … |
The End.