49,761 Topics
| |
I dont know how long I've been trying to figure this out but I havent got to an answer.... I believe that there must be a way of converting an integer to a double or visa versa but I cant think how... I always thought parseInt or parseDouble wud work … | |
hi , my program calculate the area of rectangle , and I have some errors , and dont know how to correct them . this is the program , [CODE] #include<iostream> using namespace std; class Rectangle { private: double length ,width ; public: double getW(); double getL(); void setW(); void … | |
Hello, I'm sorry if this has been asked before, but I didn't seem to find any answers. I'm trying to write a function that would delete a specified number from a singly linked list. This is what i've got so far, but it's not working: [code=c++] void remove(list*& start, int … | |
I have this data 1 2 3 4 5 6 7 8 9 10 0 1 0 9 0 0 5 0 0 3 How to count rowwhich have value only? Which the answers is only 4 column which have value? something like this I do. [code=C++] a[i]=total; total=a[i]+temp; myfile<<"\t"<<total<<setw(5); … | |
I have a structure in which there are three float variables, and in a bigger program, I'm using an array of these structure objects. Now, I thought that each time in a loop when I was using values of these structures, I was creating a new copy of those objects … | |
I wrote this a little while ago... I know i need to add a file check so overwrite does not occur but I am interested in learning to write clearer and less amatuer code. Any serious note would help... this program creates a file with an input name, saves text, … | |
In an attempt to improve my coding skills, I decided to program a very simple DOS calculator. However, when i try and compile the program, I am presented with with following: [CODE]------ Build started: Project: Basic Calculator, Configuration: Debug Win32 ------ Compiling... Basic Calculator.cpp c:\documents and settings\my documents\visual studio 2008\projects\basic … | |
I have a major problem. I need to write a program using linked lists that will display... A B C D E F and then... F E D C B A without using a tail pointer. When I run the program, it displays the first set of letters but crashes … | |
Hi guys! I have started writing a program for phonebook which will add, delete, search, display and sort the information of a person. information will include firstname, lastname & phonenumber. now I was testing the first part of the program which adds a contact. but my loop is not doing … | |
I am new to C++ I recently been trying to write an Game data base in C++ but I succesed in nothing though the Code seem to be all right it always shows me error messages this is the Source Code i created for this program: [CODE] #include<iostream.h> #include<conio.h> #define … | |
This came up in another thread. I gave some advice that I'm not longer sure of. Rather than hijacking that thread, I figured I'd start my own. I advised against using the == in that thread. The context was this: [code=cplusplus] string subChoice =""; getline(cin,subChoice); if (subChoice == "100") { … | |
I need help with an assignment I am working on. Here is the assignment: count all the even numbers between X and Y, where X and Y are entered by the user. Do not include X and Y. EXAMPLE 1: Please enter an integer: 0 Please enter another integer: 10 … | |
Im very well a beginner and I cant quiet grasp classes. I found that this topic is all over forums and I have decided to give it a whirl and I am stuck. Here is what needs to be done. You should create a class called ComplexNumber. This class will … | |
I know it has to do something with my main and around the "how many classes" but my program runs without any errors or warnings but blows up so I was wanting to know if someone could take a look at it..... I know I havent worked on the gpa … | |
this program is inorder to split a string like krishnamoorthy into krishna & moorthy by splitting it at m i tried the following coding.the compiler pointed out an error saying that for cannot be expanded inline.what shud i do to rectify the error?this [code=cplusplus] #include<iostream.h> #include<string.h> #include<conio.h> class string { … | |
I thought I had posted this earlier but... I am working on a sorting problem using counting sort but am getting a crash when I run the program. I have fixed some of the problems but I am still missing something. I just need a extra pair of eyes to … | |
I wonder something about this code that read(ifstream) a .txt file. In my file I have these 2 lines: [B]Hello,1000,Yes,walker How,2000,No,walker[/B] So with my code I use getline with a delimiter to put these 4 different strings/int to variables. The code works fine for the 2 first, wich is "Hello" … | |
ive been writing a c++ program to make a quiz but i couldn't figure out about how u can put a timer. the timer should actually countdown from 20 to 1 and once the time is over it has 2 move on to the next question and no points should … | |
[QUOTE]Hi, I have an assignment where I need to take a string and display it in reverse order and then convert anything in upper case to lower case and vis versa. I have the first piece of the code, but I'm not sure where to begin with the second piece. … | |
Okay I need to be able to limit the input parameter to one!!! Example Enter a number 1 fine!! Enter a number 1 2 No good!! Help please!!! | |
HI! I need help! please somebody help me! I need program Sudoku in language C or C++, but I can't programming. please send me source code thanks very much! this program is very important for me, because I need this in school | |
Count the words of each line in a file. No suppositions will be made regarding the maximum length of a line. And my not working c code: //Count the words of each line in a file. No suppositions will //be made regarding the maximum length of a line. #include<stdio.h> #include<string.h> … | |
I have a GridViewControl on my Form in C++ .NET. I have put values to Rows and Columns like this: (3 columns and 5 rows) 1 a f 2 b g [B]3 c h[/B] 4 d i 5 e j What I wonder here is if I click with my … | |
When i compile my program i get the error "floating point exception". I do not know why this is occurring my code. I am hoping that this is the reason why nothing is being put into my outfile. if it is possible could you look at my code and give … | |
I understand how to use CreateProcess, ShellExecute(Ex), _spawn, exec methods to start a child process from a parent process. Question: Is there a way I can return values back to the parent process from the child process? For example, the child process sets an integer value and I want the … | |
this is some of code. I have a question. what is the meaning of '?' and ':1;' [just this part] [code=syntax] int t, dt, * cnt, tmax=0; cnt=(int*)calloc(M,sizeof(int)); ... /* Compute the mean-squared displacement using the straightforward algorithm */ fprintf(stderr,"# computing...\n");fflush(stderr); for (t=0;t<M;t++) { for (dt=1;(t+dt)<tmax;dt++) { cnt[dt]++; /* number … | |
iam facing thesame problem of run page not getting displayed.can i use srand function in this program. and what is its use and syntax? [code=cplusplus] #include<iostream.h> #include<stdlib.h> int randomno(); int main() { int i; cout<<"ten random numbers for the range 0 to 50"<<endl; for(i=0;i<10;i++) { randomno(); } } i int … | |
Hello, Lets say i have 3 classes called class1, class2 and class3. Class1 has a method which returns a value, in class2 there's a pointer variable to class1(lets say class1* c1) and in class3 there's a class2 type variable(class2 c2). I would like to access the method from class1 through … | |
I need to create a program that is a table to convert between centigrade and fahrenheit temperatures. My solution must must utilize functions to perform the conversions. Requirements: 1. One of the functions must use pass-by-value, returning the converted measure 2. One of the functions must use pass-by-reference to store … | |
i am supposed to split a string like krishnamoorthy into krishna and moorthy using operator overloading.i am unable to strike upon the logic to write a program.can u pls help me? |
The End.