49,761 Topics

Member Avatar for
Member Avatar for TinhornAdeniyi
Member Avatar for hardit_marwah

[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!!! …

Member Avatar for Ancient Dragon
0
72
Member Avatar for MrJNV

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

Member Avatar for Fbody
0
96
Member Avatar for slavacrilov

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

Member Avatar for slavacrilov
0
105
Member Avatar for cperepelitsa

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 …

Member Avatar for rts1
0
4K
Member Avatar for malayasthana

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:"; …

Member Avatar for Fbody
0
143
Member Avatar for Anuradha Mandal

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() { …

Member Avatar for Taywin
0
93
Member Avatar for vinitmittal2008

Please give Free download links of Latest and Best C/C++ Compilers for Windows...

Member Avatar for Ancient Dragon
0
158
Member Avatar for myrk

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 …

Member Avatar for Stefano Mtangoo
0
704
Member Avatar for malayasthana

[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 …

Member Avatar for Fbody
0
150
Member Avatar for vedel

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? :'(

Member Avatar for vedel
0
222
Member Avatar for havalka

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

Member Avatar for Ancient Dragon
0
78
Member Avatar for sundip
Member Avatar for georgy9002

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 …

Member Avatar for mtbs1826
0
170
Member Avatar for im abcd

[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); …

Member Avatar for elsiekins
0
197
Member Avatar for jarejaa

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 …

0
64
Member Avatar for notmasteryet

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]; …

Member Avatar for low_coder
0
267
Member Avatar for garu525

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... …

Member Avatar for garu525
0
178
Member Avatar for geryin

[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 …

Member Avatar for WaltP
0
180
Member Avatar for denmark22
Member Avatar for group256
0
108
Member Avatar for BOAH365

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 …

Member Avatar for BOAH365
0
185
Member Avatar for cmccaig

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 …

Member Avatar for Taywin
0
954
Member Avatar for MasterGberry

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 …

Member Avatar for MasterGberry
0
93
Member Avatar for mdpepper

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 …

Member Avatar for mike_2000_17
0
164
Member Avatar for Anuradha Mandal
Member Avatar for emlinux

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 …

Member Avatar for Ancient Dragon
0
68
Member Avatar for mrar85

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 …

Member Avatar for mrar85
0
161
Member Avatar for cmb2thim

could you please help me? i need to write a program, no dynamic allocation, using classes and arrays to multiply only 3x3 matrices only

Member Avatar for daviddoria
0
61
Member Avatar for qvyhnl

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.

Member Avatar for qvyhnl
0
101
Member Avatar for Nathaniel10

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 …

Member Avatar for Nathaniel10
0
162

The End.