49,761 Topics

Member Avatar for
Member Avatar for munchlaxxx

The program says it's stopped working after I input the first number... #include <iostream> using namespace std; int average(); int main(){ char answer; cout << "Average calculator." << endl; cout << endl; cout << " Enter a stream of positive numers (0 or above)." << endl; cout << "Enter a …

Member Avatar for np complete
1
194
Member Avatar for dgipling

I working with an application written in Visual Studio C++. Then program is a console application running under the DOS-prompt. The program is something like this. void main () { for ( ;; ) { do_something (); do_something_more () } } Now I need to add some code between do_something …

Member Avatar for richieking
0
239
Member Avatar for glenndr_15

Greetings! Just want to ask how to create a C/C++ ide then link to a compiler? any advice? can I use a visual studio for creating an IDE?... Thanks Best regards, glenndr_15

Member Avatar for glenndr_15
0
346
Member Avatar for shahzad.malik.140

1. The square of an integer n is normally calculated by multiplying n by itself, that is, n2 = n * n. Another way to calculate n2 is by adding the first n odd integers. For example, 1 + 3 + 5 = 9 = 32 1 + 3 + …

Member Avatar for WaltP
0
132
Member Avatar for persianprez

Can someone please finish this off, i need the days to start going on the day specified [code=c] #include <iostream.h> int main() { int month;//asks for current month int days;//asks for day of start int numdays;//number of days in the month int monthstarter=1; //starts day count cout<<"Enter a month (1 …

Member Avatar for WaltP
0
257
Member Avatar for bdl365

I want to print the following using for loop. from the pattern, it's clear that when row and column is equal to each other it prints A that gives me A from top left to bottom right need clues A - A A - A A - A A-A ----A---- …

Member Avatar for WaltP
0
284
Member Avatar for Jsplinter

About 11 months ago I started this [thread](http://www.daniweb.com/software-development/cpp/threads/386863/declaring-const-int-causes-error-c2582-operator-function-is-unavailable) asking why I couldn't use a const data member in a class that was going to be used in an stl container. The explanations were excellent. Now my question is, what is the best alternative to having a class with BOTH a) …

Member Avatar for mike_2000_17
0
273
Member Avatar for Unidennn

Hi, im pretty new to c++, and im stuck on this problem, i need to assign a letter from and array of stings to an array of chars and i just cannot figure it out. any help is appreciated. I tried both and both give me errors: strcpy (newChars[j],alphabet[i]); newChars[j]=alphabet[i]; …

Member Avatar for Ancient Dragon
0
190
Member Avatar for JDoggieIII

Hi, I am using C++ MFC and I wouldn't exactly call myself an expert :-). What I have is a thread drawMonitor which monitors when to draw and I would like it to call DrawLines() (which is a member function in the class) to do the drawing. void drawMonitor(void *); …

Member Avatar for Ancient Dragon
0
272
Member Avatar for orar

#include <iostream> #include<string> #include<vector> using namespace std; struct Names { string fname; string lname; void output() { cout<<fname<<" "<<lname; } void input() { cin>>fname>>lname; } }; struct birth_info { int month; int day; int year; void input() { cin>>month>>day>>year; } void output() { cout<<month<<"/"<<day<<"/"<<year; } }; int main() { string …

Member Avatar for deceptikon
0
179
Member Avatar for klharding2

So in my program I have to use specific values obtained from an inputfile in different functions, and I couldn't figure out a good way to do this. I don't want to have to have the user input the file name for every function. I tried it this way, but …

Member Avatar for ktsangop
0
183
Member Avatar for kayceedude

Write a C program that roll a single six-sided die 10 times. Produce a random number from 1 through 6 as shown in the following frequency distribution. (Hint: use an array of counter)

Member Avatar for kayceedude
0
92
Member Avatar for mangsmurf

I am having a problem in making a program that will display what time that school staff log in, their names, and the option to log out in a tabular form using multidimensional arrays in the program. Can anyone help me?

Member Avatar for Lucaci Andrew
0
49
Member Avatar for akiller47

Hi, Im trying to figure out how to display a number from an array where it has been chosen by a random number. I have got an array with 10 different numbers (always different when program is ran). Each index is added with the previous index number So lets say …

Member Avatar for kayceedude
0
292
Member Avatar for Albino
Member Avatar for ShEeRMiLiTaNt

Hello I am trying to allocate a dynamic array of length that the user inputs. I have a function to this for me but it doesn't allocate the number that I want it to allocate. For example, when I input one it gives me 7 digits... heres the code: int* …

Member Avatar for ShEeRMiLiTaNt
0
114
Member Avatar for webdragon89

I have to implement Warnsdorff's Rule via an algorithm given to me by my professor. I've gotten it to work however one thing that I can't get to work is for the ending point to be one "knight's move" away from the starting point. This is my code so far. …

0
96
Member Avatar for daino

Does anyone have any experience with PODOFO [Click Here](http://podofo.sourceforge.net/index.html). I've read everything they have to offer and I admit, some of their points are a little advance for me. I'm trying to determine whether PoDoFo can be compiled as part of my c++ application so that my application is standalone. …

Member Avatar for daino
0
881
Member Avatar for Kanown

Hello so i have been making a program and decided to start on error checking. I'm asking the user to input a 1 to continue and a 2 to exit simple. I worked the code out for the error checking though when i compiled and ran the program all it …

Member Avatar for WaltP
0
232
Member Avatar for Albino

Errors: 1>c:\users\will\documents\visual studio 2010\projects\sdl test\sdl test\main.cpp(239): error C2065: 'string' : undeclared identifier 1>c:\users\will\documents\visual studio 2010\projects\sdl test\sdl test\main.cpp(239): error C2146: syntax error : missing ';' before identifier 'str' 1>c:\users\will\documents\visual studio 2010\projects\sdl test\sdl test\main.cpp(239): error C2065: 'str' : undeclared identifier Code: `string str;` For some reason strings are giving me errors.

Member Avatar for Ancient Dragon
0
166
Member Avatar for chanda gul

Hi!! If any one has the code in c++ to recover deleted files from FAT and NTFS then please post it here. It is to note that i need actual code, not the already made tools. Thanks

Member Avatar for Ancient Dragon
0
413
Member Avatar for bdl365

Need help to print grids of letters ..for example ABABA BABAB ABABA BABAB ABABA BABAB so when row and column numbers are the same (r == c) the program prints an A. Any clue as to how I should approach this problem will be appreciated? this is what i got …

Member Avatar for bdl365
0
198
Member Avatar for bdl365

If i want to print a grid of letters..for example AAAAA BBBBB AAAAA BBBBB AAAAA this is what I got so far. need some clues as to how I should approach the problem? #include <iostream> using namespace std; int main () { int n; cout << endl << "Enter a …

Member Avatar for bdl365
0
258
Member Avatar for luisvaldes88

A simple project that provides an interface to encrypt and decrypt strings using the next algorithms: - AES - Blowfish - Cast - DES - Idea - Rc2 - Rc4 - Seed The project uses PoCo C++ libraries, they have a nice and easy to use interface for OpenSSL I …

Member Avatar for WaltP
0
256
Member Avatar for parth27987

I was wondering if there is a way to import file names from one specific folder to a text file. for example... my whole music foler. I want to create a text file for all the songs that I have in that folder. Is it possible and if yes how …

Member Avatar for parth27987
0
132
Member Avatar for hakibam

I modify this .cpp code into .c but it gives error: the original code is:(runs fine) [CODE]#include <string> #include <iostream> #include <stdlib.h> using namespace std; int main() { int c, s[10]; int i, j; string name; cout << "Welcome to Airline Reservations System!\n"; for (j=0; j<10; j++) { cout << …

Member Avatar for Abin Jossy
0
2K
Member Avatar for phfilly

Hi guys! So I need help with a small problem. I'm using a char pointer array which contains a mathematical expression. For example: "sqrt 25" Now I want to use the inbuild c++ function `sqrt(int))`. I'm first searching in the array for the letters 'sqrt' so that my custom function …

Member Avatar for WaltP
0
390
Member Avatar for owenransen

I've had a sudden surge of interest in an old (2007) program which is an MFC Dialog based app. So I'd like to spruce it up a bit, and one of the annoying errors is that its proper icon does not appear in the bar at the bottom of Windows. …

Member Avatar for ktsangop
0
465
Member Avatar for haber5

Hi I have a big (working) software written in C++ that uses SQL database, using the ADO interface. I'm currently using old ADO libraries (prior to the Windows7 SP1 problem) and wish to upgrade. I'm considering taking advantage of this need and upgrade to ADO.NET. What do you think?

Member Avatar for np complete
0
168
Member Avatar for riahc3

Hey I want to make a Visual C++ program targeting x86 (and ARM) Windows CE .NET 4.20 using .NET Compact Framework. How do I do this? Thanks

0
50

The End.