49,760 Topics

Member Avatar for
Member Avatar for c++_fem

Does anyone know how to list all variations of vector elements in C++ ? Is there a function like for permutations (next_permutation) ? tnx

Member Avatar for c++_fem
0
2K
Member Avatar for eng hassan

[CODE]// Project !!!.cpp : Defines the entry point for the console application. // #include<windows.h> #include <iostream> #include <conio.h> using namespace std; class Predator {private: int x; int y; char z; char board[20][20]; int count1; int count2; public: Predator(){ for (int j=0; j<20; j++) { board[0][j] = '@'; board[19][j] = '@'; …

Member Avatar for eng hassan
0
132
Member Avatar for jp071

Hello, I would like to display result in form window. The result is changes every 5 seconds. The form is only close when i stop program. I am using console application in visual c++ 2008. Anybody could help me, how can i display data in form view when i use …

Member Avatar for nbaztec
0
159
Member Avatar for ashar5

Hi, I am using ReadDirectoryChangesW to get file added/modified/deleted notifications. In the dwNotifyFilter argument, I gave the following filters. FILE_NOTIFY_CHANGE_CREATION|FILE_NOTIFY_CHANGE_LAST_WRITE|FILE_NOTIFY_CHANGE_SIZE|FILE_NOTIFY_CHANGE_ATTRIBUTES|FILE_NOTIFY_CHANGE_DIR_NAME|FILE_NOTIFY_CHANGE_FILE_NAME Normally the process has been waited in GetQueuedCompletionStatus function and return notifications whenever a file is added/modified/deleted. The issue I am facing is, when a file is added/modified one time …

0
32
Member Avatar for frag

Hello all. I'm currently studying computer science, and I need some insight concerning data structures. i'm asked to create the necessary data structure to hold the population and saving factor of all cities. CITY: Population: Saving factor: Nicosia 200 0.4 Limassol 120 0.6 Larnaka 65 0.7 Paphos 30 0.75 Paralimni …

Member Avatar for JohnSmith12
0
131
Member Avatar for Brandon515

[CODE]#include <fstream> #include <string> using namespace std; typedef struct blook { char* name; int hour; char* day; char* month; char* year; char* alive; char* sick; char* pregnant; char* adult; char* elderly; char* child; char* water; char* meat; char* wood; char* seeds; char* vegtables; }info; info load(string name1) { info black; …

Member Avatar for jonsca
0
146
Member Avatar for shayankhan

Hello guys ... can anyone help me or guide me if i am thinking wrong, can we copy character array into character array. like char names[250]; cin>>names; names=names+names; like we do with int a; cin>>a; a=a+a; can we do this with character array i want to store 7 names into …

Member Avatar for shayankhan
0
93
Member Avatar for lcfc12

I need to get this program to display the most expensive value and the most taxed value in text form from the names stored in the array. The following code works out everything apart from displaying the most expensive and most taxed items on the screen. This needs to be …

Member Avatar for daviddoria
0
101
Member Avatar for yongj

So there's a handsheet that my professor gave me as a guideline to follow. It gives us the prototype of the functions and that's IT. However, when I put in the prototype and fill in the body, an error comes up in regards to a conversion error. Any help? Here's …

Member Avatar for Agni
0
95
Member Avatar for Chris11246

I am a little new to coding, I just finished CS 1 in college, and I want to learn something that will get me more interested in doing my own projects so that I will be interested in teaching myself more. Right now I want to learn some simple image …

Member Avatar for daviddoria
0
104
Member Avatar for Eng.muslima

I have a program code deal with a drug data in pharmacy ...the program is running without syntax error but I have a problem in search code ..it apply search on the first record only but didn't apply on other records..I have tomorrow an exam ..please help me..I'm sorry for …

Member Avatar for Eng.muslima
0
125
Member Avatar for cgage22

[CODE]string name; char gender; string address; cout << "Enter the name : "; getline(cin,name); cout << "Enter the gender (M/F) : "; cin >> gender; cout << "Enter the address : "; getline(cin,address);[/CODE] I don't understand why this skips the input action for the address.

Member Avatar for NathanOliver
0
120
Member Avatar for adonay alex

i have already read the (read me before posting),and have come to ask an assignment which was given to me yesterday.so, i really need your help on getting the answer to a question that says WRITE A C++ PROGRAM THAT CALCULATES THE GRADE OF A STUDENT AFTER ASKING THE GIVEN …

Member Avatar for NathanOliver
-4
163
Member Avatar for ashar5

Hi, Assume, I have a following table whose schema is, create table testing (test1 integer not null, test2 integer not null, test3 integer not null, test4 integer not null); And assume the following details are inserted: insert into testing values (1,1,0,0); insert into testing values (1,1,1,0); insert into testing values …

Member Avatar for Ancient Dragon
0
126
Member Avatar for JKARIUKI

Am tryin to connect my c++ program of Visual Studio 2008 to a database bt hav problems. In VB.net 2008 I include a module (procedure). How do I? Someone help pliz.

Member Avatar for Ancient Dragon
0
174
Member Avatar for Abiha

i didn't understand ur answer plz reply in more modified way and also tell wats the prob in a=pop(); & in b=pop(); and also tell the output of a+b*c/d^e rply as quick as possible thankyou [code]#include<iostream.h> #include<conio.h> #include<string.h> #include<stdio.h> #include<ctype.h> #include<math.h> #define MAX 20 char stack[MAX]; int top=-1; char pop(); …

Member Avatar for NP-complete
-2
1K
Member Avatar for lul
Member Avatar for bobsta

Hi, I am still experimenting with STL trying to weigh up the pros and cons. I wish to define nested/embedded classes i.e. [CODE]typedef std::vector vector <class B> bVecArray; typedef std::vector vector<std::string> sVecArray; class A{ bVecArray bObjArray; std::srting curLine // current line in dataFile ... }; class B{ sVecArray header; };[/CODE] …

Member Avatar for mrnutty
0
142
Member Avatar for iamthwee

Hi, I trying to get the LAST modified text file in a folder, but unsure how to do it. I am using the following code:- [url]http://www.adrianxw.dk/SoftwareSite/FindFirstFile/findfirstfile3.html[/url] [code]#include <windows.h> #include <iostream> using namespace std; int main() { SYSTEMTIME SysTime; HANDLE hFind; WIN32_FIND_DATA FindData; cout << "A very basic FindFirst/Next demo.\n" << …

Member Avatar for Radical Edward
0
1K
Member Avatar for bladethebric

what comand is used for printing a text ?? OpenGL programing .. with GL in front .. IF ( something is set ) bla bla bla bla bla bla print text ( what is the comand ) else same here ?? GL_printtext .. or something ??

Member Avatar for bladethebric
0
110
Member Avatar for Mike182

Im trying to finish this calculator program, its for a writing rpg on a forum, for a post you get line count creativity rating and difficulty rating using these 3 things you use a special formula to find out the final power level, this code compiles ok, but when it …

Member Avatar for Jessica Garcia
0
121
Member Avatar for RayvenHawk

I have an assignment that has me reading in a file and creating a token for each string and special characters in it (which isn't the part I need help with). I currently have part of the program working 98% but am getting an error when I execute the program. …

Member Avatar for RayvenHawk
0
196
Member Avatar for BobbieJean

Hello, I can't seem to get my program to build correctly. It seems I've finally gotten close because now it will build with no errors but with 2 warnings. I'm not sure what else to change in my code to fix it. Could anyone please help? Here's my code: [CODE]// …

Member Avatar for jonsca
0
136
Member Avatar for straight_rydr

I need the user to input a book title then price, once that is done when the user searches for the book it displays the title and price that the user has made. Right now its showing weird numbers when displaying the price for book. [CODE]#include<iostream> #include <iomanip> using namespace …

Member Avatar for Crak
0
128
Member Avatar for Leppie

Trying to create 20 files using ofstream. I could name each individual file on creation, file01.txt, file02.txt ect but wondered if it was possible to use a string variable in place of say the file name (file01.txt) and then use a loop to create the other files. Does the name …

Member Avatar for Leppie
0
2K
Member Avatar for blumarker

Hello, I'm having trouble with buttons with Visual Styles enabled on a black background color. Like so: [url]http://i48.tinypic.com/28lf6zn.png[/url] On an effort to fix this I attributed WS_EX_TRANSPARENT style to the buttons, which only made these bits of white border-like aspects appear occasionally(they show up at random times and for random …

0
19
Member Avatar for genux

hi all, I kinder got bored with software development for a bit and was not until I noticed CS106A(Java based) and the CS106B (C++) which has really re-light my developer bug as such.. was wondering what other courses can people recommend to keep that bug keep on going ?

Member Avatar for genux
0
69
Member Avatar for LevyDee

Hi, I'm trying to iterate through an stl list object list(customer being my struct that holds the name, age and gender variables[customerList being my list]), but I'm getting an error. [code] void store::listCustomers() { vector<customer>::iterator it; for(it = customerList.begin(); it != customerList.end(); it++) { cout << it->name << endl; cout …

0
55
Member Avatar for JaimeSharp

Now I HAve Written The following Programs [CODE] # include <iostream> # include <string> # define MAXSIZE = 300 using namespace std; bool findTitlePrice(string allTitles[300], double allPrices [300],int totalRec,string title,double price); string allTitles[300] = { "Book 1", "Book 2"}; double allPrices[300] = { 78.5, 66. }; int main () { …

Member Avatar for JaimeSharp
0
259
Member Avatar for bigcheesy

Hello, I am having some trouble figuring out an assignment I was given in class. I am not looking for any code, but need a better explanation that what the teacher has given. Basically the program will calculate the number of days between any two days from 1/1/1900 through 12/31/2099, …

Member Avatar for JeyHey
0
7K

The End.