49,757 Topics

Member Avatar for
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
157
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
701
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
167
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
62
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
176
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
184
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
945
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
159
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
Member Avatar for r3s3v0ir

Good evening guys.... i'm newbie in here and in c++... while i in the middle of pratice in making program... i try to make a stack that can check whether the string that user input is palindrome or not. i'm using visual studio 2010 and get autos error this is …

Member Avatar for Taywin
0
232
Member Avatar for Jake1905

I am completly lost on this could someone point me in the right direction into where I am going wrong with this code. [CODE]#include <iostream> using namespace std ; int main() { int x ; int y ; int temp ; int remainder ; // read in the two integers …

Member Avatar for ixmike88
0
98
Member Avatar for burcin erek

i made a test program, this line " *ps.Working_Hours=10;" generates mistake. why ? [CODE]#include <cstdlib> #include <iostream> using namespace std; class Salary { public: int Working_Hours; float hour_rate; float x; }; int main(int argc, char *argv[]) { Salary s; float yy; s.Working_Hours=7; s.hour_rate=30.5; Salary* ps; ps=&s; *ps.Working_Hours=10; cout << "s.hour_rate=" …

Member Avatar for burcin erek
0
173
Member Avatar for jvibez

write a pseudocode algorithm tp prompt the user to enter a number and it should tell if the number is odd or even.........i need help

Member Avatar for daviddoria
0
47
Member Avatar for mogaka

am new to c++. i want to create a desktop application but i don't know how to create a user interface-forms like vb.ne forms using dev c++ IDE. how do i go about it.

Member Avatar for daviddoria
0
216

The End.