49,761 Topics
| |
How do I write a C++ program that takes a string containg a full name, and outputs each part of the name seperately? const string fullname= "Horatio thadeous Hornblow" using only simple codes like length, size, adding, and subtracting. | |
I want some functions of one class in another class how can i acess that functions | |
Hello, I am trying to create a program that will read the point-slope information for two lines and determine if they intersect or are parallel. Below is the code I have: [CODE=c++]/*Point_Slope.ccp Reads the point and slope information for two lines and * determines whether they intersect or are parallel. … | |
hi, I am trying delete an old txt file and rename the new modified txt file... i followed everything from the example. However, i can't successfully rename the file. deletion is ok though. thank you. [code=cpp] void save(Name inName[], int j) { ofstream writer; writer.open("save.txt"); for(int x=0; x<j; x++) { … | |
im trying to make a counter to count the number of odd numbers in an integer entered by a user but somehow my loop doesnt seem to go on as i hoped it would...im trying practise using the while loop that some of u guys demonstrated on my other thread... … | |
hi, My program created an object array containing 271 objects from the "names.txt", and each object has 3 private class variables, "id lastname and firstname "...... i know i can't use ofstream writer to write it to a new file like.... Name name; writer<<name[270]; Anyone please help me understanding how … | |
Never mind. That question was solved by myself. anyhow, when I compile my code, I get an error. [CODE] #include <iostream> #include <windows.h> using namespace std; int main(){ for (int number=1; number<=6; number++;){ if (number == 1){ numbersuffix = "st";} else if (number == 2){ numbersuffix = "nd";} else if … | |
hi, thank you for replying. i started a new thread because nobody took a look at the old one. i finally figured out a way to add two arrays and using eArray. i also wrote the fibonacci code. However, when i debug and print the fibonacci number, i get some … | |
[code=cpp]#include <iostream> #include <iomanip> using namespace std; const float originalPrice = 50; const float markedupRate = 10; const float cTaxRate = 4; int main() { cout << "Enter the original price: "; float originalPrice; cin >> originalPrice; cout << "Enter the marked up rate(percent) : "; float markedupRate; cin >> … | |
See i have a program in c or c++.. this program has many functions like add(), mul(), div(), sub() etc.... now i want to call a function such that in main there should be only one call for that particular funtion that i have to be called... ie in runtime … | |
Hello! I'm a web developer and have not ventured outside of the AJAX threads. However, we're trying to take on a desktop application project here at work, and I'm wondering what language to specify it to be built in. We have programmers in C++ and Java (as well as C). … | |
Hi, I need to bubble sort a list of integers(unknown size). Unfortunatly I cant use the sort() method. Have tried transfering the contents to an array and sorting that but to no avail. If Anybody feels like hitting mewith some ideas would be great. Thanks! | |
Hi, i am getting frustrated with my code. please, please, please help me. i wrote a class eArray with different functions and i have all of them working but 2. for the first i am trying to get the nth fibonacci number. the second one, i am trying to add … | |
Hey. I'm having some trouble writing a program. I just begun C++ and don't know the language all that well. I've gotten a small start to the program and could really use some pointers. Here are the program descriptions: Read list of strings and store strings in array of strings. … | |
Hello everyone, I have been visiting this site often as a guest, and I've noticed that it is a very nice community. Now, I have a question myself, and I hope I will be able to get some answers =D Anyways, I started learning C++ about... 2-3 weeks ago. Not … | |
Hi wait (unsigned int delay) wait (unsinged long delay) Whats the difference between the two, i forgot to test this out, basically its part of a delay for seven segemtn display which just cycles through numbers, what would be the difference between the two? thanks for nay help | |
Hey guys, I just signed up, and I have a question. I am trying to develop a text-based game using Dev C++, and I am trying to get out of the "enter 1 to go east, enter 2 to go north, etc." approach, and am trying to move onto a … | |
Okay... my goal is to start with an array of for instance 5 entries. [CODE]int myArray[5];[/CODE] Then at some point once the array is passed to a function, change the number of entries (example: load a new list of something into the array that has a different number of entries) … | |
I've been trying to solve this problem,but I failed.I stuck in runtime.I checked my codes and algorithm many times,but I can't figure where the problem is.So I need help!These are my code. [[CODE]//-------------------backTrack.h---------------------------------------------------// #ifndef BACKTRACK #define BACKTRACK #include "Application.h" #include "Position.h" class BackTrack { public: BackTrack (const Application& app); void … | |
i want to implement a binary tree code but i encountered a problem. after i insert some numbers to tree, i couldn't print my numbers except first one or i couldn't insert the numbers except first one. As a result my binary tree doesn't work, it only shows the first(root) … | |
[B]I need help To comment this program for my college work[/B] [CODE]#include <stdio.h> int main() { int a; a = 0; while (a <= 300) { printf("%4d degrees F = %4d degrees C\n", a, (a - 32) * 5 / 9); a = a + 20; } return 0; }[/CODE] | |
I have implement a desktop lookup mechanism . Indexing and retrival works fine. But when a file is updated , created or deleted i would like to get the notifaction so that i can update my index . Is there any C++ code availabe for FileSystemWatcher ( which is in … | |
So finally after a little waking up i fixed my write to a file in raw binary problem. Now I am trying to load the same data from the file i created. Here is the code I came up with. [CODE]#include <fstream> #include ".\vertexs.h" using namespace std; int LoadVerts(char *s_fName, … | |
Ok this is what I am wanting to achieve : I have a notepad filled with documentation, and there is some key words in the document that: IF EXIST = is copied from the document and then sent in an email to someone. IF NOT EXIST then the last three … | |
Hello I'm haveing a problem running my program because i keep getting error C2447: '{' : missing function header (old-style formal list?). Can someone explain to me how to fix this problem? Below is a copy of my program. The program is designed to take three number inputed buy the … | |
I want to know what is the differnt between continue and the break ? | |
Hello!! I thought I would try and post a problem I have been unable to solve as of yet, though I imagine is easy for experts ;oP I am trying to play around with the mouse functions of Windows, attempting to create a sort of mouse free environment that uses … | |
Hello, I'm looking for some help with this short and simple program which I've had problems with for ages. The code for the last solution was apparently right, just didn't work. Anyway here is the latest one: [code]#include <iostream> #include <cmath> using namespace std; int main() { const double dx=0.1; … | |
Hey guys, I'm new at this and was wondering if someone could help. I need to calculate the average amount of gallons used per km driven but I don't know how to do it. What do I need to include in my code(below) to include an average? I'd appreciate any … | |
Hey Everyone! I have two - hopefully simple - problems that I need help with. I wrote an atm program in c++ that works except for two things... (1) the part where I calculate the balance based on the interest rates for the checkings and savings accounts need to be … |
The End.