49,761 Topics

Member Avatar for
Member Avatar for Mathias_1

I'm trying to create a program where I can print output to my console application and entering test without being override. Is there anyway to accomplish this? Here is my simple code showing my issue: ` #include <iostream> #include <thread> #include <Windows.h> void myThread() { while (1) { std::cout << …

0
164
Member Avatar for txhornsfan

I'm having problems with sending the input to another program... Here is what I'm supposed to do. Ask for nth number in the fibonacci sequence. The program will call another program (fibonacci.exe) genterate the nth number and pass back the information to the parent process, and display all numbers of …

Member Avatar for Ancient Dragon
0
209
Member Avatar for Xakzi

Hello! I am working on a small decryption / encryption program using Win32 Console Application c++ nothing big, here is my code: #include "stdafx.h" #include <iostream> #include <fstream> #include <conio.h> #include <stdio.h> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { char name[100],target[100],ch,mod; //Declare Variables unsigned char apostrophe; int num[100],i,option; …

Member Avatar for kill-it
0
357
Member Avatar for VBOI

Help in a loop to reloop and convert the prices and prices2 of those houses in the array to a double??????? [code]for (int i=0;getline(file,(house[i]),',');i++) { getline(file, cars[i], ','); getline(file, price[i], ',') ; getline(file, price2[i]); if(input == house[i]) { for(int i=0; ) ?????<<<<<<<<<<<<<<--Help here. } [/code]

Member Avatar for Moschops
0
114
Member Avatar for fashxfreak

I need to write a C++ program to analyze three different data files, and try to confirm Benford’s law.I need to create a console application that opens each file, counts the number of values that start with ‘1’, ‘2’, ‘3’, etc., and then outputs the percentages of each digit. Based …

Member Avatar for fashxfreak
0
685
Member Avatar for daniel1977

Dear Friends: I am working on a prject and I am receiving these three errors: Warning 1 warning C4244: 'argument' : conversion from 'time_t' to 'unsigned int', possible loss of data F:\College Material\CS270\SourceCode\Exec11_14\Exec11_14\BST.cpp 18 1 Exec11_14 Error 2 error C2664: 'bSearchTreeType<elemType>::postorderInsert' : cannot convert parameter 2 from 'bSearchTreeType<elemType> **' to …

Member Avatar for UFOOOOOOOOOOO
0
153
Member Avatar for Stpdoug

Hey guys i am having trouble with creating a Parent class(gameobject) for two other child classes(player,location) both of the child classes can access data from the parent class, and work well independently but once i include the h file for the child classes together in main.cpp i get the compiler …

Member Avatar for UFOOOOOOOOOOO
0
354
Member Avatar for Henshens

includ<iostream> includ<conio> using namespace std; int x,z; char op; switch(op);{ cout<<"input two a rate"; cin>>x z; cout<<"category operator ( + , - , * , / , %)"; cin>>op; swich(op) case'+':cout<<"opertor +"<<x+z<< endl; break; case'-':cout<<"opertor -"<<x-z<<endl; break; case'*':cout<<"opertor *"<<x*z<< endl; break; case'/':cout<<"opertor /"<<x/z<<endl; break; case'%':cout<<"opertor %"<<x%z<<endl; break; default:cout<<"your are false"; …

Member Avatar for UFOOOOOOOOOOO
0
186
Member Avatar for princessophia

I am supposed to write a program that asks for the name of a pole vaulter and the dates and vault heights ( in meters) of the athlete’s three best vaults. It should then report in height order ( best first), the date on which each vault was made, and …

Member Avatar for UFOOOOOOOOOOO
0
281
Member Avatar for flony

hello friends, trying to understand a little work with txt, and in c + +, the file I can not open and goes straight to the end, what will my mistake the file is called nombres.txt and contains > carlos, alberto, raul, tomas, and the code is #include<iostream> #include<fstream> #include<string> …

Member Avatar for flony
0
200
Member Avatar for Brian1983

How would I go about modifying this code to accept characters instead of integers? #include <iostream> #include <cstdlib> using namespace std; struct node { int key; node *next;}; int main(int argc, char* argv[]){ if(argc >2) { int i, N = atoi(argv[1]), M = atoi(argv[2]); node *t, *x; t = new …

Member Avatar for Brian1983
0
184
Member Avatar for abhimanipal

Hi Guys, I am trying to teach myself templates and I keep getting lost in all these compilation errors. Here is the latest // This is the interface for the base class template<class V, class I =int> class Array{ private: vector<V> myStore; public: Array(); Array(I size); Array(I size, V value); …

Member Avatar for abhimanipal
0
248
Member Avatar for lovelyv

So this is what i need to do and its not coming out right in my code. i need A function to calculate how long the balance will take to grow to a given value. This function is not part of the account class. It should take two arguments: an …

Member Avatar for lovelyv
0
383
Member Avatar for cambalinho

i build these code. it's very cool: in test.h: class test { private: bool blVisible; int x=0,y=0; public: void Show(); bool Visible() { return blVisible; } void Visible(bool value) { blVisible=value; if (value==true) Show();//call the event } }; in main.cpp: include <iostream> #include "test.h" using namespace std; test a; void …

Member Avatar for cambalinho
0
230
Member Avatar for cambalinho
Member Avatar for cambalinho

the Visual Studio 2010 have 1 way for build properties, in class's. but isn't a portable code:( i'm using GNU\GCC\G++. so don't belive that isn't possible do it in C++;) so anyone can advice me? i was testing these code, but i get problems with char* and i can't use …

Member Avatar for cambalinho
0
332
Member Avatar for Luckychap

Here is simple Digital Clock coded in C++ and compiler used is TurboC. A class DIGIT is designed to draw digits. Follwoing are the details for this class: Consructor: DIDGT(); for default settings DIGITE(int s,int c,int st); for user define settings s -> is size of the digit c -> …

Member Avatar for irum.nageen.3
-2
15K
Member Avatar for abhimanipal

Hi Guys, I am trying to teach myself templates in C++. My current assignment is to create a matrix class by using vector of vectors. I have got most of it done but my code is crashing when I try to overload the random access operator in my matrix class. …

Member Avatar for deceptikon
0
443
Member Avatar for skyyadav

Write a minimal terminal emulator which will basically just transmit all characters typed on the keyboard to the serial port and display all characters received via the serial port. Include a set of menu items that will allow a user to:  Select, modify or set the communication parameters such …

Member Avatar for Ancient Dragon
0
228
Member Avatar for TalentedIndividual

Im having a few problems developing an algorithm to find the Minimum subsequence sum. Can anyone offer any advice?

Member Avatar for phorce
0
69
Member Avatar for younes.keraressi

![![hi, im wondring why i get this error here my code: #include <iostream> #include "Stuff.cpp" using namespace std; int main() { //... } //Stuff.cpp #include <iostream> #include <string> using namespace std; bool Correct_Parent(string x) { int p_Left_Counter = 0; int p_Right_Counter = 0; for(unsigned int c = 0; c < …

Member Avatar for younes.keraressi
0
199
Member Avatar for k88joshi

Hi all, I am fairly new to C++, but i am having trouble declaring a 2D dynamic array. Any help will be appreciated. Thanks

Member Avatar for cambalinho
0
739
Member Avatar for gneisler

The code on lines 44-53 is suppose to check see if the user enter a negative and produce a message, however, when the use enters a positive code produces the display again. #include<iostream> #include<cctype> using namespace std; int main() { char carType; int A, B, C; char keepgoing; char condition; …

Member Avatar for cambalinho
0
141
Member Avatar for cambalinho

i'm trying doing a static clas, but i, always get errors... now i have head pain:( class Pessoa2 { private: static string strnome; public: Pessoa2() { strnome="ana"; } void setnome(string value) { strnome=value; } static string getnome() { return strnome; } }; just seen these static class, what i'm doing …

Member Avatar for cambalinho
0
211
Member Avatar for cambalinho

i read several time about Bitwise Right Shift Operator (>>\<<) but i continue without understand them:( can anyone explain to me? i don't undertand what will be the next results:( Half = 25 >> 1; Half = 25 << 1;

Member Avatar for cambalinho
0
387
Member Avatar for anga08628

Define a 5 x10 2-dimensional array of integers (5 rows of 10 columns), randomly generate 50 numbers between 1 and 100, assign them to the array elements and display all the numbers on 5 lines of 10 integers each. [code=cpp] #include <iostream> #include <ctime> // For time() #include <cstdlib> // …

Member Avatar for irum.nageen.3
0
11K
Member Avatar for weathermans

Hi, looking for help on how to get data from an xml file, or txt file and then automaticly send it over the serial port. I am looking to program a sports score ticker

Member Avatar for Ancient Dragon
0
256
Member Avatar for weathermans

Hello I'm looking for some help on how to get a XML value which would be one word. Then take that value and output it in a C# or C++ program. Using windows 7 and visual studio 2010. I have Novice programming knowledge. Thanks for help.

0
151
Member Avatar for donlxu

Hi. I'm trying to create a program to compute the Riemann zeta function which is defined as **1**+**(1/(2^x))**+**(1/(3^x))**+**(1/(4^x))**+.... for user input of x and will keep adding as long as the term is less than (1e-7). but I keep getting 1.79301e-307 for every number I put #pragma hdrstop #include <iostream> …

Member Avatar for donlxu
0
194
Member Avatar for sportguy98

Hello everyone, I am having trouble with an assignment. The assignment consists of a basic encryption and decryption program already written for me, I just have to write the encryption function. What we have to get the program to do is enter an integer and a text, and get the …

Member Avatar for ddanbe
0
186

The End.