49,761 Topics

Member Avatar for
Member Avatar for rite2bobby

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.

Member Avatar for JRM
0
116
Member Avatar for rajachi

I want some functions of one class in another class how can i acess that functions

Member Avatar for zhelih
0
99
Member Avatar for dbwalters

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. …

Member Avatar for dbwalters
0
149
Member Avatar for k2k

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++) { …

Member Avatar for Salem
0
134
Member Avatar for number87

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... …

Member Avatar for jonesc5
0
168
Member Avatar for k2k

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 …

Member Avatar for brk235
0
135
Member Avatar for jonathanasdf

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 …

Member Avatar for jonathanasdf
0
215
Member Avatar for olams

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 …

Member Avatar for olams
0
104
Member Avatar for jalo3030

[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 >> …

Member Avatar for JRM
0
302
Member Avatar for rkavinash

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 …

Member Avatar for Salem
0
115
Member Avatar for Tom Tolleson

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). …

Member Avatar for Narue
0
85
Member Avatar for c++beginnerer

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!

Member Avatar for Narue
0
112
Member Avatar for olams

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 …

Member Avatar for olams
0
183
Member Avatar for curls

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. …

Member Avatar for curls
0
189
Member Avatar for jonathanasdf

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 …

Member Avatar for jonathanasdf
0
140
Member Avatar for Villanmac

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

Member Avatar for vmanes
0
220
Member Avatar for XCal1ber

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 …

Member Avatar for Narue
0
260
Member Avatar for loushou

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) …

Member Avatar for Narue
0
80
Member Avatar for GSTARRAW

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 …

Member Avatar for vijayan121
0
152
Member Avatar for omeralper

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) …

Member Avatar for sweety0
0
101
Member Avatar for Zinc15

[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]

Member Avatar for sweety0
0
72
Member Avatar for Aashath

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 …

Member Avatar for vijayan121
0
165
Member Avatar for loushou

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, …

Member Avatar for Duoas
0
108
Member Avatar for CodyOebel

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 …

Member Avatar for Ancient Dragon
0
119
Member Avatar for noodlneck

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 …

Member Avatar for noodlneck
0
325
Member Avatar for bis student
Member Avatar for JRM
0
129
Member Avatar for starkman

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 …

Member Avatar for Lerner
0
635
Member Avatar for twoheadedboy

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; …

Member Avatar for twoheadedboy
0
161
Member Avatar for HowBil

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 …

Member Avatar for Lerner
0
220
Member Avatar for programmingme

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 …

Member Avatar for JRM
0
277

The End.