49,761 Topics
| |
[CODE] i am a 13 year old stuck at this, someone please help me out!! i have a problem defining a character variable its giving the error lvalue required #include <iostream.h> #include <conio.h> void main() { clrscr(); char name [20]; cin >>" Your name please...", name; if (name="john") //over here!!! … | |
I have a struct as follows: [CODE]struct Database { int accountNum; double balance; int months; };[/CODE] I want to make a vector of this struct, because I want the size to vary. How do I do that? Thanks in advance | |
I have a program that requires to reverse the name which is a string, here's the code... it's suppose to work, no errors found.... but "Run time error" [CODE] int i = fullName.length(); while (i>=0) { cout<<"Your reversed full Name is: "; cout<<fullName.substr(i-1, 1); i--; } [/CODE] thanks | |
It's probably obvious that I'm more familiar with Python than C++... I was wondering if there's a convenient way of storing objects / miscellaneous STL structures on the hard drive for later importing and use in C++ in the same manner that Python does with the Pickle module. I know … | |
i want to itterate through the vector and want to check if entered string is present in the string vector or not.. so please help me to know how can i do it i have done just as we do to itterate through vector<string>: vector<string>::iterator it; cout << "myvector contains:"; … | |
I want to make an user defined STACK.But I have some problems with this following code. Please find what is worng. [CODE] #include <iostream> #include <conio.h> using namespace std; #define MAX 10 class stack { private: int arr[MAX]; int top; public: stack() { top=-1; } int m; void input() { … | |
Please give Free download links of Latest and Best C/C++ Compilers for Windows... | |
Hello, Can anyone suggest a GUI library that meets the following criteria? * Cross-Platform * Doesn't control the main loop * Not 100% object-oriented; similar to Xlib :) * Not many pointers please (like FLTK that every object is a pointer) * Free to use for closed source and open … | |
[CODE]vector<string> file_pass; if(count == m2+1) { p2_pass = onfile.tellg(); shift = p2_pass-p1_pass; onfile.seekg(-shift,ios::cur); for(j=0;j<shift-1;j++) { onfile.get(ch); temp_pass[j] = ch; } user_pass.assign(temp_pass,temp_pass+shift-1); file_pass.push_back(temp_pass); }[/CODE] for first input asthana it is giving asthana but after push back for second input saxena it is giving saxenaa i know last a is from first … | |
I have a asm boot on a floppy disc and i want to show a c++ kernel (cuz c++ are easy). but how can i link it? I heared somethig about : extern _main call _main for asm. Can anyone help me? :'( | |
Hello everybody, I have got a code that read txt file. But I wounder how I can read many text file from a folder and save each one in a separate array. Help Please | |
Hi Does any buddy help me to convert char* to std::wstring | |
Hello Guys I am having problems with an assignment. I need to create a class to make a rectangle. Then I have to - Declare an object of the class (rect1) using the default constructor. Now prompt the user for a Width, Height and Character. Store the results in temporary … | |
[CODE]# include <stdio.h> # include <iostream> using namespace std; int main() { int a,b,c; while (true) { cout<< " enter ur first digit"<< endl; cin>> a; cout<< "enter ur second digit" << endl; cin >> b; cout << " ur ans is "<< (a-b) <<endl; continue ; break;} scanf ("%d%",&c); … | |
Hello there I am implementing heap sort by maintaining min heap property. It is working fine but the order is descending, I want ascending order. One way is to invert the output array and get the desired output but this is not what I want. Like in min heap root … | |
hi guys, trying to figure out how to put X when seat is taken plz help [//Airplane Seat Assigning system. [CODE]#include<iostream> using namespace std; int main() { char seat [7][4]={}; //initalize 7 rows and 4 columns char arr[4]={'a','b','c','d'}; int i,j; int row, colnum; char col; for(i=1;i<=7;i++) { for(j=1;j<=4;j++) { //cout<<seat[i+1][j+1]; … | |
I wrote this string palindrome program that reads input from a text file. All the syntax are correct but I have an error I couldn't understand. Any help is appreciated, thanks!!! First, this is the error message: [B]Error 1 error LNK2001: unresolved external symbol "char * newToCheck" (?newToCheck@@3PADA)[/B] And this... … | |
[CODE]#include <cmath> #include <iostream> using namespace std; void prime(int num) { int numPrime=true; for(int c=2;c<num;c++) { if (num % c == 0) { numPrime=false; break; } } if (numPrime == true) cout << "TRUE" << endl; else cout << "FALSE" << endl; } int main () { int n; int … | |
how to make a simple browser using c++ and by using <stdio.h>&<conio.h> | |
Hello, I'm very new at C++ and I have to write a code that uses a recursive function to reverse some characters within a boundary, so lets say I have A[1] == ‘A’ A[2] == ‘B’ A[3] == ‘C’ A[4] == ‘D’ A[5] == ‘E’ and I put in a … | |
im writing a program for school that needs to search through a directory and find files of a certain type. if it meets up with a folder i need to search inside it and so on for all other folders found inside. i was thinking of a function to pass … | |
I am a novice @ coding right now, and am getting it by trial and error, when i run this program after the 2nd round of input it skips some of the steps and then crashes. I threw the if (i > 0) to help bypass it on the first … | |
Good evening folks. Im a Computing student in 2nd year of Computer Science at university. My current problem is the idea of a class within a class. I have developed a .h and.cpp file for a Date class(day, moth year), and a .h and.cpp file for a patients record. I … | |
What is the function of "cin.get()" and "cin.ignore()". | |
hii to all i am very new to c++ . i am learning c++ while i try to compile this program it give error as "pair as ambiguous symbol" error. in this program iam trying to understand the how polymorphism works. #include "stdafx.h" #include <iostream> #include <conio.h> #include "mouse.hpp" using … | |
im' confuse with this function...how do i call one function so it can be used in another function?? [ICODE]#include <iostream> #include <cmath> using namespace std; double pi=3.1416; double getinput(); double distance(double,double,double,double); double radian(double); double circumferences(double); double area(double); double diameter(double); void displayresult(double,double,double,double); int main() { double x1,x2,y1,y2; double rad,perimeter,areas,dia; cout<<"Please enter … | |
could you please help me? i need to write a program, no dynamic allocation, using classes and arrays to multiply only 3x3 matrices only | |
So i have an original char * s with size of n; Can someone show me how to create another char * p with twice the size of s? and then fill p with 2 copy of s? Thanks. | |
I was already thinking along ARKoenig's suggestion and revised my code to use arrays. It was working pretty well until I made some minor changes. Now it loops non-stop without any prompt for the player to make a play. I am sure it is a small error, but I can't … |
The End.