49,761 Topics
| |
**Bold Text Here**I am trying to make a generic linked list . below is the code for linkedlist . #ifndef GenericLinkedList_h #define GenericLinkedList_h #include <iostream> #include "GenericLinkNode.h" //class GenericLinkedList; template <typename T> class GenericLinkedList { private : GenericLinkNode<T> *head; public: GenericLinkedList(); void traverse(); bool isEmpty() { return head == NULL … | |
I am wondering if it is safe to debug a c++ code on my website? If theres an article that talk about that pls. post the link together with your reply. Thank you :) | |
how can i resize a window console buffer? i know that i can use the SetConsoleScreenBufferSize(), but i'm getting problems convert from pixels to characters, because the vertical scrollbar is showed and the size isn't changed correctly, because it's more big than the buffer size: CONSOLE_SCREEN_BUFFER_INFOEX consolesize; consolesize.cbSize=sizeof(consolesize); GetConsoleScreenBufferInfoEx(hConsole,&consolesize); COORD … | |
Hi everyone, Please check my code below and tell me that why double stores number upto 3 decimal places ? #include <iostream> using namespace std; int main() { double dNo; dNo = 363.430965; cout<<"double no : " <<dNo <<endl; //cout only outputs dNo value upto //3 decimal places return 0; … | |
Hi Guys The thing is that i was asked to make a libaray database managment software for my semester project which i did but now my teacher is asking to give that same project in OOP and i am really bad in that.Can anyone change my program into Object orientied … | |
Hello everyone, I have a shool project that requires me to design a cash register class that uses an inventory class and the cash register should perform the following steps: 1. ask the user for the item and quantity purchased. 2. get the item's cost 3. add 30% profit to … | |
Hi all, Im currently working on a c++ program for school, and I thought it would be nice If i framed the output from a function. I looked all over the web to find a solution to no avail. Im completely stuck. I keep getting 2 errors: *154:35: error: expected … | |
My c++ program using visual studio 2012 has one error that i cant figure out what. The error says " 1 IntelliSense: expected a ';' " I do believe that the eror from my program is after this part: cout<<"\n @@@@@@@@@@@@@@@@@@@@@@"; cout<<"\n @@@@ @@@@"; cout<<"\n @@@@ @@"; cout<<"\n @@@@"; cout<<"\n … | |
Construct a large integer (32 – Bit) from two Byte Variables (8 – Bit) and one Word Type variable (16 – Bit). Store your result into EAX and print it. Like if byte1 = 21h, byte2 = 43h & word1 = 8765h Then your output may be 87654321h OR 43218765 … | |
I am trying to do a deck of cards in linear form so that I would be able to tell if I am guessing the right card. The program should be able to tell if the guess is getting closer or not. I made a random number generator (randomNum = … | |
Hello, My function below is part of a program that compiles and runs. The core of the program is in the function below. The issue is that the variable named "PNL" below as well as "CumLoss" and "CumProfit" don't reset to 0 when the loop "L" restarts. So the output … | |
I'm getting these types of errors: identifier "gm" is undefined or expected a ';' How do I fix these errors? #include <iostream> #include <cstdlib> //srand #include <ctime> //time #include <cmath> #include <string> using namespace std; int G_master; int m_secret; int m_choice; int m_win, m_prev_delta; int Number_guess; int Card_guess; int delta; … | |
Hi All, I am trying to implement generic link list in c++ . But getting below error . Please assist me to correct it. LinkedList.hpp LinkNode<E>* head; errr: unknown tpe name ''LinkNode // LinkNode.hpp // cplus // // Created by Ravi Rathore on 10/12/15. #ifndef LinkNode_hpp #define LinkNode_hpp #include <stdio.h> … | |
Hi,how would i need to change this code to accept strings insted integers in avl tree? template<class T> void InsertItem(TreeType<T>& tree) { cout << "Enter number: "; int num; cin >> num; tree.InsertItem(num); cout << "Number inserted:" << num; } | |
Hello, so I needing some help with creating a program for my class. The lab requires us to use pointers. This is the description of what we have to do... -Write a function that accepts an int array and the array’s size as arguments. -The program should ask the size … | |
[I]Interesting tricky program using C & C++: [/I] [B]Program 1:[/B] Create a Program which produce output "Hello World" , the program must not contains semicolon ; in other word any statement of the program will not have a termination semicolon. [B]Program 2:[/B] Write a C or C++ program which run … | |
Here is what i have to do Create Class CSalary with private member variables string m_strProfession double m_dSalary Constructors:Default,Copy,Explicit Functions: 1/string GetProf(void),double GetSalary(void) 2/SetProf(const string val),SetSalary(const double val) 3/Output(ostream&) and Input(istram&) 4/Operators:<<,>>,=,==,<,double operator*(const CSalary&obj) Create Class CCalcCorr with private member variables: vector<CSalary>m_vCity1//data for city 1 vector<CSalary>m_vCity2//data for city 2 double … | |
I've decided to write a Website in C++. I am sick of dealing with languages that layer on top of other languages, so I just want to write it in C++. I know about CGI++, but I was wondering if there were any other tools or methods used for writing … | |
what I am trying to do is store same letter to same node. For example: let say I have person, people is sent to be put into a node. This will create two node. I want to some thing like P: Person People Person and People are same note When … | |
Hello, can anyone help me in searching code for hand gesture recognition system using opencv in c++. Thanks | |
hello!! i need a source code that takes integer value as input from user and then print equilant alphbetic form of that number range is 0 to 99 and minimum number of lines /statements used ?? can any oe help me with that.. | |
**I was wondering if a mp3 file can be opened with OpenFileDialog box and the whole path of the mp3 file is returned in constant unicode character, i.e. LPCWSTR. I am using Dev-Cpp. Please tell me solution for mingw-based compiler.** | |
one way of finding the square root of a certain number N is by using newtons method repetedly untill the absolute value 2 successive new guess is less than 10 raise to power -6 | |
how do i better understand pseudocode and solve problems that concern it | |
Please help me to solve the following program in C++ array. After compile message appears [B]"Possible use of "i" before definition.[/B] [code=c++] #include<iostream.h> #include<conio.h> void selsort(int [],int); void main() { int AR[50],N,z; clrscr(); cout<<"How many elements do U want to create array with?(max.50)....."; cin>>N; cout<<"\n Enter Array elements.....\n"; for(int i=0;i<N;i++) … | |
How does random and randomize functions work? Please help me! What are the different outputs that can be predicted from this program? And How? Explain. #include<iostream.h> #include<stdlib.h> void main() { randomize() int Game[] = {10,16},P; //what does this mean? int Turn = random(2) + 5; for(int T = 0; T<2; … | |
So i am new to c++, I don't know what is wrong with my program, I keep looking for the issue but can't find why it won'r run. So i am trying to develop a program which reads the numbers the user inputs and convert those into rows of asterisks. … | |
So I'm working with time.h for this (copied from msdn): int main( void ) { struct tm newtime; char am_pm[] = "AM"; __time64_t long_time; char timebuf[26]; errno_t err; // Get time as 64-bit integer. _time64( &long_time ); // Convert to local time. err = _localtime64_s( &newtime, &long_time ); if (err) … | |
| Hey guys, I am trying to figure out how to do a double transposition cipher. This is what I have so far to take in a string and then put that string a 2x2 array of a fixed size that I made. I have the key that I want to … |
The End.