49,761 Topics
| |
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() … | |
write a program to calculate the striking rate of cricket team in c++ if score 90 and balls70 then gradeA,if score20 and balls 15 then gradeB, if score 10 and balls 10 thengrade is c,if score20 and balls 40 then gradeD,if score35 and balls30 then gradeE also algorithm and pseudocode … | |
/Design a program that supplies numbers (9000 only) and outputs their equivalent Roman numerals. //the supply numbers and their equivalent Roman numerals are given below. //Supply number equivalent Roman Numeral //1 I //5 V //10 X //50 L //100 C //500 D //1000 M Sample Output: Enter integer (1-9000):1984 MCMLXXXIV … | |
How could i convert One number system to another system? this is the output: Choose a number system below: Press A if you want Decimal to convert to another number system. Press B if you want Binary to convert to another number system. Press C if you want Octal to … | |
Write a program to read a maze from a text file into your array, print the unsolved maze, solve the maze, and then print the solution. You may assume the maze will fit in a 24-row by 81-column character array (for 80 character C-strings). The maze will be in a … | |
I have a social security program that I need finished. I have the code so far but I need to know how to make is where the user can only input numbers and no letters. This is what I have and I just do not know how to program only … | |
// onlyme.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include<stdlib.h> using namespace std; int inputa; int inputb; int Andgate(void); int orgate(void); int notgate(void); int andgate(void) { cout<<"input Gate A, enter 1 or 0, enter 2 to end program "; cin>>inputa; cout<<"input Gate B, … | |
Basically I need to change the Two StudentType* functions to const but i know its not letting me because of the &ersand sign on the ReadStudentData function, is there anyway around this? I am not asking for someone to do my hw just point me in right direction it brings … | |
this is probably a dumb question but how would I remove the array so that there is no max size on it. struct StudentType { string studentName; int testScore;//Between 0 and 100 char grade; }; const int NUM_STUDENTS = 20; int main() { StudentType student[NUM_STUDENTS]; } this is what i … | |
How can i possibly use array to create a password program? #include <iostream> using namespace std; main() { int password[5] = {1,2,3,4,5}; int pass[5]; cout << "enter pass: "; cin >> pass[5]; if(pass[5] == password[5]) { cout <<"hey"; } else { cout << "error"; } } | |
why i cant move the formula under int main()? #include <iostream> #include <stdlib.h> using namespace std; double fIntoCm(double dIn) { double dCm; dCm = dIn*2.54; return (dCm); } double fYtoM(double dY) { double dM; dM = dY*0.914; return (dM); } double fOtoM(double dO) { double dM2; dM2 = dO*29.574; return … | |
Complete program - design two recursive functions with menu: Write a program that asks the user to input a positive integer, and then produces a menu where the user can choose to either check if the number entered is a prime number or print the sum of all the integers … | |
I am trying to create a simple string class, but i am getting a run time error. What i want to accomplish is to store a const char pointer to a char pointer. I am trying to use the strncpy function, i also tried the memcpy, but both gave the … | |
This will be a relatively quick article because it's a simple issue. The `system` function gets a lot of flak for being slow because it calls the shell runtime to execute a command, but I rarely see the more devastating issue of security brought up. `system` is insecure in many … | |
I'm designing a LongDouble datatype which take a 16 byte space. my question is how to add or substract a two double numbers correctly ex : a= 3.025466 b=4.132655`` the result will be 7.158121 but in my code it's different here is my code LongDouble LongDouble::operator+( LongDouble olong) { LongDouble … | |
hello everybudy i'm writing a code to revers a stack but i have a wrong output when i Calling the reverse function can anyone help me please :) :) # header.h # class intnode { public : intnode(int , intnode*); int info; intnode* next ; }; class Stack { public: … | |
there is a large busy cosmetic store. In store, for billing, there are four counters with four tellers (who deal payment etc) . A customer comes to the store and collects the things he/she wants to purchase and go to one of the counters to pay for purchase. If there … | |
Here is the problem as it is written in the book: Write a function that accepts a C- string as an argument and returns the length of the C- string as a result. The function should count the number of characters in the string and return that number. Demonstrate the … | |
Hi to all,can someone can help with animation project and help with the steps. I have canvas created and a few imagesof pacman 7x7 px ,how will i make him move left,then right,up? It something to do with positioning.And second question is how to put the diffrerent color on the … | |
Hey guys, Now that the previous problem was fixed I was finally able to run my program but now I just don't know what is wrong. Everytime I would enter in a few numbers and let it run, it would print out a series of the same number. Can someone … | |
would here anybody like to suggest some good books on pointers ? Actually some of my friends often say me that pointer is hard , too hard(however i've not started learning pointers , so i can't say). And i'd like to make the pointer concept very clear , so please … | |
A weather analysis program uses the following array to store the temperature for each hour of the day on each day of a week. int temp[7][24]; Each row represents a day (0 = Sunday, 1 = Monday, etc.) and each column represents a time (0 = midnight, 1 = 1 … |
The End.