49,757 Topics

Member Avatar for
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
282
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
880
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
411
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
Member Avatar for dpsh

Hi, pls try to observe the size(i.e. total) of object for below program and in different cases as commented out. #include<iostream> using namespace std; class B { int x; // try by commenting either data member and observe the object size int *p; public: virtual void show(){} }; int main() …

Member Avatar for dpsh
0
92
Member Avatar for szejna

In the function for overloading the >> operator I am getting this error: 84`rationalize_number' undeclared (first use this function) this is the function: istream& operator >>(istream& in, Rational& rational1) { char tempChar; int numerator = rational1.numerator; int denominator = rational1.denominator; in >> tempChar; if(tempChar == '(') { in >> rational1.numerator …

Member Avatar for rajenpandit
0
116
Member Avatar for wids101

this loop is running more times then i want to and when the user puts in the wrong number how do i print out an error. #include <iostream> #include <iomanip> #include <cmath> using namespace std; int main() { string answer; int soda; do { cout << "Choose a drink or …

Member Avatar for wids101
0
96
Member Avatar for iamthwee

At the moment I'm using getPixel() to scan the screen and get coord colours, but it's seriously slow. What's the best way to do it? Get a screen grab as a .png or .jpg and then process it. Would this be faster...

Member Avatar for iamthwee
0
100
Member Avatar for davecoventry

I'm trying to port opensource C++ code into my own Pascal application. Specifically, I'm using libredwg source to read an AutoCAD drawing file so that I can extract text attributes and populate a database using Lazarus. char* copy_bytes_16(char *dst, char *src) { *(uint64_t*)dst = *(uint64_t*)(src + 8); *(uint64_t*)(dst + 8) …

Member Avatar for triumphost
0
215

The End.