49,761 Topics
| |
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++] … | |
how to write an algorithm that converts deceimal to binary, using mod , div and an array to display the answer | |
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 … | |
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 … | |
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() … | |
on running any program in dev c++ screen cannot hold and it close in very few second what i do for holding screen | |
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 … | |
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 … | |
c++ code for trust based clustering technique in manets | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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????? … | |
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 >> … | |
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.. | |
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 … | |
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 … | |
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. | |
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? … | |
| 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 <= … |
How to know the name of process in the other process? or who started that process. | |
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 … | |
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 | |
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 … | |
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? … | |
How do I compile a c program in Visual C++ 2008 express edition? I tried finding a compile button but i couldnt find it | |
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 … |
The End.