49,757 Topics

Member Avatar for
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
165
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
111
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
181
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
187
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
218
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
249
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
100
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
164
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
117
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
316
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
634
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
Member Avatar for loushou

I am trying to dump 2 longs, an array of floats and DWORDs, and an array of shorts into a file, USING BINARY out mode. Here is my code: [CODE]#include <windows.h> #include <fstream> #include ".\vertexs.h" using namespace std; int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { OURCUSTOMVERTEX p_verts[5] …

Member Avatar for Duoas
0
98
Member Avatar for olams

Hi, I am writing a program about getting the nth fibonacci number using a class that i have created. I am having problems with it. Any help is greatly appreciated. [code] *void lfib(int a){ int i; eArray x(500), y(500), ans(500); x=y=1; for(i = 1; i<=a; i++){ ans = x + …

Member Avatar for Duoas
0
64
Member Avatar for Flixter

Can someone help me with this task? Write a C++ class that implements all the functions of an ordered dictionary using (2,4) tree??? Needs me for today if someone now somethnig pls send something.

Member Avatar for Narue
0
103
Member Avatar for sasdap

How to integrate python and c++? Can you help by telling the steps to follow?

Member Avatar for sneekula
0
45

The End.