49,757 Topics

Member Avatar for
Member Avatar for Fil_1

I've been having a hard time for quite a while now trying to read files. These files include English text, pictures music and so on. After hurting in the jungles of Africa or the internet I found something that worked. `string str((istreambuf_iterator<char>(fileIn)), istreambuf_iterator<char>());` This made it possible to do all …

Member Avatar for NathanOliver
0
910
Member Avatar for Faisalmunawar15
Member Avatar for chahinez.abdelo.9

Hello, please help segmentation of a picture in color using Builder C++ -Level set or - Growing region or - Watershead.

Member Avatar for rubberman
0
132
Member Avatar for Ola Loay

Create a two & three -Dimensional Shapes Mini-system that consists of 6 shapes, Square, Rectangle, Triangle, Circle, Cube and Sphere and then calculate area, perimeter, volume , or draw the shape. After that, it does the following tasks: 1. The code ask the user to enter the required values should …

Member Avatar for Rafiii
0
384
Member Avatar for deepeshmathuria

#include<iostream.h> #include<stdio.h> char A[3][3]={1,2,3, 4,5,6, 7,8,9}; void printmaze(); void makemove(int,int); void checkmove1(int,int); void checkmove(); void checkrow(); void checkcol(); void checkdiag1(); void checkdiag2(); void makealtmove(); void result(); int main() { int m11,m12,m21,m22,m31,m32,m41,m42,m51,m52; char ch; do { cout<<"Welcome to tic-tac-toe"<<endl; printmaze(); cout<<"for choosing 1--> input 0 0, 2-->0 1, 3-->0 2 \n …

Member Avatar for Moschops
0
192
Member Avatar for Echo89

Hi, I wrote this implementation of Sieve of Eratosthenes, is there any way I could eek some more performance out of it. As in opitmising data types, calculations etc. #include <iostream> // cout #include <math.h> // sqrt #include <time.h> // clock/CLOCKS_PER_SEC #include <stdlib.h> // malloc/free using namespace std; int main(int …

Member Avatar for Moschops
0
171
Member Avatar for TheAustinG

Hello fellow coders, I am currently taking a C++ class and have a final project due very soon. We are recreating the game Othello/Reversi using the console. So far I haven't run into really any problems and it hasn't been too bad. I have almost all of it complete except …

Member Avatar for TheAustinG
0
492
Member Avatar for CodyOebel

OK down below where my IDM button is under WM_COMMAND: is my checkbox processing body. Under WM_CREATE is the checkbox being created. The problem is my application always starts with the check box checked, and will NOT let me uncheck it with the mouse. Please help would be great! /********************************************************************/ …

Member Avatar for CodyOebel
0
657
Member Avatar for CodyOebel

Can someone please tell me why when I check one of my boxes, and click the button I get no message box in accordance to which checkbox I checked. #include <windows.h> #include <dos.h> #include <stdlib.h> #include <fstream> using namespace std; #define IDC_MAIN_BUTTON 101 // Button identifier #define IDC_MAIN_EDIT 102 // …

Member Avatar for CodyOebel
0
973
Member Avatar for Labdabeta

Hello, I posted on this forum two times before about a particular pair of non-printing characters being inserted into my code. You can find the threads [here](https://www.daniweb.com/software-development/threads/441611/stray-non-printing-characters-in-my-programs) and [here](https://www.daniweb.com/software-development/cpp/threads/450296/arbitrarily-appearing-non-printing-character). Two great posters tried their best to solve this problem (mike_2000_17 and deceptikon) to no avail. Finally, using the hints that …

0
132
Member Avatar for samishaikh

Problem Your task is to write a program that plays the game of life. This game is a computer simulation of the life and death events in a population of single-cell organisms. Each position in a two-dimensional grid (Petri dish) can support one cell. The program determines whether each position …

Member Avatar for chahinez.abdelo.9
0
532
Member Avatar for yaya1234

Hey, I would like to break one char for example "t6" into to chars t and 6 look at what i did... int a,b; temp = *arraystr[2] % '10'; a = temp - '0'; temp = *arraystr[2] / '10'; b = temp - 'a';

Member Avatar for sepp2k
0
113
Member Avatar for muhammadshahroz
Member Avatar for rela

Could someone please tell me how I can run my C++ code using Command prompt? How should I open it, and what I need to write? And if there are more than one text files in my code including input data, how I can choose one of them to run …

Member Avatar for CodeWarrior14
0
412
Member Avatar for haulover

Reading Stroustrup: Programming -- Principles and Practice Using C++, chapter 4, exercise 4: "Write a program to play a numbers guessing game. The user thinks of a number between 1 and 100 and your program asks questions to figure out what the number is (e.g., "Is the number you are …

Member Avatar for Maritimo
0
379
Member Avatar for rasha80

i want to build program that recive (c code in txt file) then searching for words (int , double, char, float) and count number of vaiables appear according to that. then store the variables in array (e.g. int x; i want to store X in array and so on). i …

Member Avatar for rasha80
0
211
Member Avatar for myk45

Hi all I have a qt application in which I have a QTreewidget that displays some content in the QTextBrowser. I set the contents for the html document in the textbrowser using the setHtml() function. All I want now is to fetch the url of this html document so that …

Member Avatar for myk45
0
476
Member Avatar for Lilgenski16

//BlackJack // Plays a simple version of the casino style game of blackjack; 1 - 7 players #include <iostream> #include <string> #include <vector> #include <algorithm> #include <ctime> using namespace std; class Card { public: enum rank {ACE = 1, TWO , THREE , FOUR , FIVE , SIX , SEVEN …

Member Avatar for マーズ maazu
0
2K
Member Avatar for muhamadfirdaus.hasnan

Can someone help? This is an assignment on a game I supposed to do. But I have plenty more to do. WRITE A PROGRAMMING TO LET A USER STICK TO THE BOLD. LET A BOARD CONTENT 3 LAYERS. A USER WILL TRY TO SPIN RANDOM VALUE BETWEEN 0 TO 1 …

Member Avatar for happygeek
-1
122
Member Avatar for asdsadddsadsd

Umm my code doesn't work properly and I don't seem to find the solution for my problem. Code doesn't print the right numbers. Can anybody help? Thank you! #include <iostream> #include <conio.h> using namespace std; main(){ int number[] = {3, 5, 8, 1, 9, 2, 6, 4, 7, 10}; int …

Member Avatar for richieking
0
239
Member Avatar for krypton25

MACHINE PROBLEM NUMBER 3 ROTATING SENTENCES Input File: rotate.txt In ``Rotating Sentences,'' you are asked to rotate a series of input sentences 90 degrees clockwise. So instead of displaying the input sentences from left to right and top to bottom, your program will display them from top to bottom and …

Member Avatar for richieking
0
196
Member Avatar for Riya_2

Write a program that reads a sentence as input and converts each word to “Pig Latin.” To convert an English word to Pig Latin, you remove the first letter and place that letter at the end of the word. Then you append the string “ay” to the word. Here is …

Member Avatar for tinstaafl
0
2K
Member Avatar for shahera.arafat

hi everyone :) I want a new questions on Hash functions and graphs >>like what process can we do on it !! any code ideas ? because I have an exam (data structure) so I want to study new ideas thanks ^_^

Member Avatar for shahera.arafat
0
113
Member Avatar for Ndriçim

Hi there, I learn C++ on internet because my gymnasium wont do it now so by searching on google i saw some topics similar with this but they weren't what I was looking for. Can i make a square on C++ using no stars or loops or anything similar? I …

Member Avatar for Moschops
0
197
Member Avatar for kieran16

#include<iostream> // this will allow me to display an output and allow the player to give input into my game #include<string> #include<sstream> using namespace std; char slot[6][7]; // this will let my game store what is inside each slot of the board // the board is a 7 x 6 …

Member Avatar for rubberman
0
322
Member Avatar for cypherscouter13

I have a large amount of code, so I have tried to only include the relevant parts of the code here I have a header file called "ASp.h" namespace ASP { class ASp { public: ASp(); ASp(FILE* fp); void T_B_P_N(const char* type, int num); } } another header file "ms.h" …

Member Avatar for cypherscouter13
0
1K
Member Avatar for Weejin

I need to write a program like this Sample output: Please enter a number(Less than 8 digits): 1203021 There are 2 zero (0) in this number I dont know how to write a formula to count the 0 inside number please teach me.

Member Avatar for Rafiii
0
149
Member Avatar for sooraj.abbasi

I m student of BSCS and i m learning Allegro library for c++ my self and i want to create a 2D-game but there are few problems are occur so can any body help me.

Member Avatar for gusano79
0
72
Member Avatar for gayathiri krish
Member Avatar for lucyfersdaddy

Hi, I am a newby and am surprised I made it this far. My program is a TicTacToe program. I am having troubles with checking the validity of each move. I have tried multiple things, but could not figure it out. If someone could help point me in the right …

Member Avatar for lucyfersdaddy
0
911

The End.