49,761 Topics

Member Avatar for
Member Avatar for owen99

hi can anyone help me i am trying to get a random character generator which generates 10 characters in ASCII range and then cast them into characters heres my code but its not working. it says error C2440: '<function-style-cast>' : cannot convert from 'std::string' to 'char' heres my code [code=c++] …

Member Avatar for Anilorap
0
1K
Member Avatar for Daneil

how to write an algorithm that converts deceimal to binary, using mod , div and an array to display the answer

Member Avatar for tinstaafl
0
297
Member Avatar for anonlearner

I hace to design a fucntion that draws lines of charaters to create a picture, like a trangle or something. The parameters are: 1) The symbol (letter or blank) 2) The line length(the number of charaters of that symbol) 3) An end line flag to incate the new line started …

0
123
Member Avatar for theguitarist

Hello, I have a graph that is represented in the form of a grid. For example: V--V --VV V---V VVVVV Each V is a node. If there is another V above/below/to the side of a V then there is an edge between them. I'm to form one single connected component …

Member Avatar for gusano79
0
150
Member Avatar for nhrnjic6

OK.So i need to bild this table and so I did.But what I cant understand is why it works fine till I hit number 18.then sudenly like half of 1st number-s (array[x]) are missing. can someone please tell me whats the trick.Thank you. #include <iostream> using namespace std; int main() …

Member Avatar for Schol-R-LEA
0
278
Member Avatar for Saurav Akolia

on running any program in dev c++ screen cannot hold and it close in very few second what i do for holding screen

Member Avatar for Moschops
0
134
Member Avatar for redkowloon

Hi all, My lecturer give an assignment Calculate student assessment and final exam work . The program can accept a name , registration no, course code and couse name as an input Input mark :- Final Exams : 40% Quizes : 15% Test : 15% Lab Exercise : 30% Sum …

Member Avatar for Schol-R-LEA
0
217
Member Avatar for offshoreworker

I have a .csv file that could have anywhere from 50 rows to over 10,000. The first 32 rows (geographical header information) will always be ignored. The 2nd column of data will have 0.00 for (x) rows. Once that column starts to read a value I want to start storing …

Member Avatar for Kfd
0
201
Member Avatar for sathya.N
Member Avatar for skyyadav

I am reading these values from a file 12.1 13.4 12.4find gg 16.77 56.55 My program should display the average of 5 float no and ignore find and gg. I did while((inputfile >> f)) { //cout << "ssss"; //continue; //} sum += f; count ++; cout << fixed << f …

Member Avatar for Banfa
0
967
Member Avatar for Jumper_1

[Click Here](http://www.gov.hk/en/residents/immigration/images/smartcard_front.jpg) Below are the steps for generating the check digit. 1. The first letter of the card number is converted into a number based on its position in the alphabetical sequence (i.e., A = 1, B = 2, C = 3, …, Z = 26), and is multiplied by …

Member Avatar for Jumper_1
0
404
Member Avatar for skyyadav

I am reading these values from a file 12.1 13.4 12.4find gg 16.77 56.55 My program should display the average of 5 float no and ignore find and gg. I did while((inputfile >> f)) { istringstream iss(f); if(!(iss(f)) { iss.clear(); continue; } sum += f; count ++; cout << fixed …

Member Avatar for tinstaafl
0
313
Member Avatar for davenie.neymar

1. Please write 1 simple C++ program to calculate any number and the operation you should do is: -add, minus,divide,multiply 2. Please write a program C++ that can accept user input ( ex.student name, address, date of birth etc..) in Character Data Type. Once, the input has been entered, it …

Member Avatar for Lucaci Andrew
0
203
Member Avatar for deep.chanda1

Here is a very simple program which is actually not working properly in Dev c++; When i compile the program it shows 0 errors,yet it doesn't run completely. Whreas if i run the same one in Borlan c++ it runs to completion,no problem. What to do such that it works …

Member Avatar for Saurav Akolia
0
404
Member Avatar for elliotell333

HELP Why wont this work? // Test.cpp : Defines the entry point for the console application. // #include <iostream> using namespace std; #include "Apstring.h" #include "apstring.cpp" int main() { apstring Game; apstring rndnum; apstring rdy; system("color a"); system("Echo GREETINGS PROFESSOR FALKIN"); cout << endl; cout << "WOULD YOU LIKE TO …

Member Avatar for tinstaafl
0
243
Member Avatar for strongard63

there is something that I can not understand in the following code: int main() { int count = 0; int x=125; while(x!=0) { count++; x=x/10; } } if x is 125 so x=x/10 gives 125=12,5 which is something odd and impossible. what is the meaning of x=x/10??? what is x=x/10????? …

Member Avatar for strongard63
0
2K
Member Avatar for Daneil

am wrting a password program in c++ but its not working, some error, says "missing function header (old-style formal list?)" #include "stdafx.h" #include <iostream> using namespace std; int main(); { int password = 1234; int password2 = 0000; int x = 0; cout << "Please enter the password2"; cin >> …

Member Avatar for Lerner
0
223
Member Avatar for zozzooo

hii I have make an application as trial period .In this application contain .afl file it Contain my functionality and this file make as trial period i am beginner in this so please help me....this .afl file is make in c++....plz help..

Member Avatar for jwenting
0
151
Member Avatar for Gà_1

Here is my few successful program: #include<iostream.h> #include<conio.h> //============================================================================== void main() { short int n,i,j,k,max; int m[50]; i=0; j=0; k=0; max=-32767; cout<<"Value of length: "; cin>>n; for(i;i<n;i++) { cout<<"Value "<<(i+1)<<": "; cin>>m[i]; if(m[i]>0&&m[i]%2==0) k++; if(m[i]<0&&m[i]>max) { max=m[i]; j++; } } cout<<endl<<"Number of natural even value: "<<k<<endl; if(j>0) { cout<<"Position of …

Member Avatar for Gà_1
0
245
Member Avatar for jvasher

I am trying to make sure that I delete all memory allocations from the new command, ran into 1 problem and I'm not sure If I understand when how the delete in a destructor of a class will be called. Problem: I create a class in main, after the game …

Member Avatar for mike_2000_17
0
182
Member Avatar for VUEKID

I need a little help to store two strings into a vector and reversing the order of each string. i.e. 123456789 needs to be 987654321 12345 needs to be 000054321 reason for that is I need to add those two numbers together.

Member Avatar for deceptikon
0
326
Member Avatar for acmarshall

Hello all, I am not sure what's wrong my code but, when I run my program it keeps going to my default switch statement. I would like my program to keep looping the menu until I put in the quit function. Can someone please tell me what I'm doing wrong? …

Member Avatar for HiHe
0
10K
Member Avatar for andrew.mendonca.967

CSCI 15 Assignment #3, introduction to classes/objects. 100 points, due 10/21/13 A mixed expression is an expression of the form a + b/c, where a, b, and c are integers, b >= 0 and c > 0. By convention, b/c is always non-negative, and has the property that 0 <= …

Member Avatar for tinstaafl
0
331
Member Avatar for skyyadav

How to know the name of process in the other process? or who started that process.

Member Avatar for richieking
0
140
Member Avatar for iamcreasy

I want my program to throw exception on console window. But when exception occures Microsoft Visual C++ Runtime library dialog box shows up. What can I do to stop visual studio from stopping execution of my program when an exception occues and let my program handle the exception? I am …

Member Avatar for deceptikon
0
434
Member Avatar for Josie Anne

Hello.. Do you have any idea about this topic? Design a set of simple test programs to determine the type compatibility rules of a C compiler. Thanks

Member Avatar for Ancient Dragon
0
98
Member Avatar for zampi91

I'm trying to create two classes in C++. Each class implements different serial and its function that is called when it receives a data on the serial port. Class 1: int serialLn = open("/dev/ttyS2", O_RDWR | O_NONBLOCK | O_NOCTTY); struct termios options; struct serial_struct serInfo; struct sigaction saio; //Serial speed …

Member Avatar for zampi91
0
937
Member Avatar for Garidius

Hello to all, I'm new to C++, but I have a program in C++ that runs from DOS console. I'd like to execute the same program adding a simple GUI with a button to select a file and inserting a value in a text box. How can I do this? …

Member Avatar for Garidius
0
545
Member Avatar for yasaswyg

How do I compile a c program in Visual C++ 2008 express edition? I tried finding a compile button but i couldnt find it

Member Avatar for asabjork88
0
368
Member Avatar for new_developer

Hi there, I need getch() type function for int through which I can take input from user, to store it in int variable. I actually want to use in menu from which user selectes any number to call that function to carray that task. Reason of using getch() function is …

Member Avatar for Moschops
0
186

The End.