49,766 Topics

Member Avatar for
Member Avatar for belalhamdy

I'm tring to develope newcamd virtual server i have read the newcamd protocol documentation there is some missed Points the newcamd protocol uses 3des encryption 112bit CBC Mode point one : what is the padding mode?? point two : what is the vector key?? another thing for example i spyed …

Member Avatar for Zurab
1
754
Member Avatar for rakib.tanbir

Declare a class (i.e., a type) called CArea and an object (i.e., a variable) of this class called obj. This class contains four members: two data members of type int (member x and member y) with private access and two member functions with public access: set_values() and area(). Calculate the …

Member Avatar for David W
-1
263
Member Avatar for Anshu27

Hi, I am trying to create a vector of a class which contains ofstream object as one of its member. The problem I am facing is that when I add single element to the vector, it work fine. As soon as I add another element to the vector, it changes …

Member Avatar for Schol-R-LEA
0
766
Member Avatar for festus_2

The heating system in a school should be switched on if the average temperature is less than 17 degrees Celsius. The average temperature is found from the temperatures in the art English and music departments. You are required to write a C++ program that allows the user to input 3 …

Member Avatar for nullptr
0
114
Member Avatar for daystarsam

Given a collection of towns in Borneo, Your task is to design a program using C++ programming language to find a way to visit all the towns and return to the starting point by minimising the distance travelled. Please note that each town can be visited only once, except for …

Member Avatar for Schol-R-LEA
-2
135
Member Avatar for segadude

For my (online) programming class, I have to format certain output in columns using setw. I am having trouble understanding how to do this. My professor says that I am supposed to be creating columns, not counting characters to align things. I haven't been able to find any examples of …

Member Avatar for NathanOliver
0
206
Member Avatar for jamesjohnson25

There was a question in topcoder. Question: Three kids are playing the following game: A word is written on a sheet of paper, and one after another, the players take turns adding letters to the word. During each turn, a player must add a single letter to either the beginning …

Member Avatar for Nutster
0
119
Member Avatar for kumanutiw

The house is built of non-standard form. All four walls are of a rectangular shape, but different height and length. The width of the walls is two bricks. There are two types of bricks. The outer part of the wall is constructed from the first type of brick, and the …

Member Avatar for David W
0
500
Member Avatar for Sherab_1

I am beginner in C++. Please someone support me. Help me in learning C or C++ Java compiler. I am just a beginer. have just installed Cygwin & MinGW in my computer. Please someone guide me in learning programing language.

Member Avatar for Curius
0
133
Member Avatar for Ahmed91za

hello i'm trying to figure out how to write a program in c++ that check when i insert a password and force me to add at least 2 capital letters and 2 numbers in the password (you've seen this before right? when signing up for new account and checks for …

Member Avatar for ravenous
0
295
Member Avatar for cambalinho

heres my function for select the font: CHOOSEFONT ShowSelectFont(HWND hwnd=GetForegroundWindow()) { CHOOSEFONT cf = {sizeof(CHOOSEFONT)}; LOGFONT lf; cf.Flags = CF_EFFECTS | CF_INITTOLOGFONTSTRUCT | CF_SCREENFONTS; cf.hwndOwner = hwnd; cf.lpLogFont = &lf; cf.rgbColors = RGB(0,0,0); cf.lpLogFont->lfStrikeOut=FALSE; cf.lpLogFont->lfUnderline=FALSE; cf.lpLogFont->lfHeight=-MulDiv(12, GetDeviceCaps(GetDC(hwnd), LOGPIXELSY), 72);//change font size _tcscpy(cf.lpLogFont->lfFaceName, "Arial" ); //we must include tchar.h if(ChooseFont(&cf)) { …

Member Avatar for cambalinho
0
1K
Member Avatar for kumanutiw

class brick { private: int length, width, height;// in mm public: void set(int len, int wid, int hei); int getlength(){return length;} int getwidth(){return width;} int getheight(){return height;} }; void brick::set(int len, int wid, int hei) { length=len;width=wid;height=hei;} #include <iostream> using namespace std; /*After Set() method write main() function which would …

Member Avatar for NathanOliver
0
185
Member Avatar for kumanutiw

class item { public: string name; string code; double price; }; class buyer { public: string name; int count; }; #include<string> #include<iostream> using namespace std; int main() { item item1; buyer buyer1,buyer2; double sum1,sum2,sumTotal; cout<<"enter name, code and price of item:"<<endl; cin>>item1.name>>item1.code>>item1.price; // The data for the first buyer cout …

Member Avatar for richieking
0
145
Member Avatar for One more line

I would like to say hello, first of all. I have been attempting to change the color of a character on my program for some time now. The characters in question will represent lava tiles with the letter "L" in my program. I would like to know how I can …

Member Avatar for Maxime_2
0
4K
Member Avatar for Aeonix

I'm sitting in classroom, trying to find more advanced usage of pointers in C++, suddenly Googling, not suspecting a thing I almost fell of the chair in middle of class laughing like a donkey (I'm young adult, so "immature" jokes tend to be funnier for me than for you likely). …

Member Avatar for mike_2000_17
0
824
Member Avatar for cambalinho

i have these function for get the string size: SIZE GetStringSize(string text, HWND hdccontrol=GetForegroundWindow()) { RECT textrect={0}; HDC txthdc=GetDC(hdccontrol); DrawText (txthdc,text.c_str(),-1,&textrect,DT_CALCRECT); ReleaseDC(hdccontrol,txthdc); SIZE a={textrect.right-textrect.left, textrect.bottom-textrect.top}; return a; } the 1st string size isn't correct. then i get the correct one. so why i get, sometimes, the wrong size? something to …

Member Avatar for cambalinho
0
395
Member Avatar for Xia_1

Problem Statement Number-Guessing Game Assignment Write a program for a number-guessing game. Each player will be given 10 attempts to key in a 4-digit number to guess the randomly generated number. All four digits of the computer-generated number MUST be different and the left-most digit cannot be zero. Create a …

Member Avatar for NathanOliver
0
235
Member Avatar for Xia_1

#include<iostream> #include<string> #include <cstdlib> //rand #include<ctime> #include <algorithm> //shuffling #include <vector> using namespace std; int main() { int option,i=0, num_part; vector<string> names; cout << "Welcome to Number-guessing Game !\n\n"; do { cout << "Menu" << endl; cout << "-----" << endl; cout << "1)To register number of participants and name …

Member Avatar for ddanbe
0
128
Member Avatar for Ahmed91za

Hello I'm a freshly new Graduate student of computer technology engineering, i'm interested in C++ as my first step into learning computer science, what books other than Bajarni books do you recommend, i don't like book that are 1000+ pages long, and prefer ones that are straight to the point …

Member Avatar for vijayan121
0
174
Member Avatar for Hector3000

#include <iostream> #include <string> #include <cmath> using namespace std; int main() { string Choice; string On, off; char a = 'A'; int i = 0, j= 0 , NUM = 2 , z = 1; cout << "Please enter 'start' to start the program\n"; cin >> On; if (On == …

Member Avatar for vijayan121
0
190
Member Avatar for usmanjani
Member Avatar for abcdz

redo (or do for the first time) programming project 2 from chapter 11. define your ADT class in separate files so that it can be compiled separately. I need help with that!!!

Member Avatar for bernardo.mclobo
0
105
Member Avatar for jamesjohnson25

Q 1) In this small snippet #include <stdio.h> void passingAddressOfConstants(const int* num1 , int* num2) { *num1 = num2; } int main(){ const int limit = 100; int result = 5; passingAddressOfConstants(&limit,&limit); } Error : error: invalid conversion from 'const int*' to 'int*' Here I defined "limit" is of type …

Member Avatar for aleeha.saqib.5
0
224
Member Avatar for kumanutiw

Create a class Candy with the following data: weight of one candy bag, price of one candy bag. There are three types of candy in the store. Find the weight and price of heaviest candy bag. What is the price of 1 candy bag with minimum weight?  Extend the …

Member Avatar for bernardo.mclobo
0
146
Member Avatar for Mahnoor_1

Ok guys ! I'm trying to study operator overloading. which i found the toughest article in OOP :( I tried a code for == operator overloading to check whether both arrays have same elements or not but it isn't working. Can anyone help? Here is my code: #include<iostream> using namespace …

Member Avatar for aleeha.saqib.5
0
239
Member Avatar for usmanjani

hello guys i need a real good ideas from u i want to create social networking program for c++ like instagram,facebook etc my general q: how to implement the coorect DSA structure on building profiles and mangae post comments message from other freinds and user?

Member Avatar for aleeha.saqib.5
0
123
Member Avatar for Ef
Member Avatar for gusano79
0
110
Member Avatar for jamesjohnson25

import java.util.*; class occult { public static void main(String[] args){ int n = 2; for (int i = 0; ; i++){ if(Integer.toString(i).contains("666")){ if ( n == 1 ) System.out.println(i); n -= 1; } } } } I have written the above java code into c++ . i wanted to know …

Member Avatar for vijayan121
0
519
Member Avatar for nitin1

Hi, Actually, I want to make one Singleton class which will create one instance for one thread. I mean if we have 10 threads, then Singleton will create only one object for one thread. IF same thread will ask for one more instance it will return the same instance. Basically, …

Member Avatar for vijayan121
0
337
Member Avatar for cambalinho

the GetDesktopWindow() give me the desktop HWND, but how can i get the desktop toolbar HWND? i belive that theres 1 function for get the toolbar on windows, but i don't know how :(

Member Avatar for cambalinho
0
157

The End.