49,761 Topics

Member Avatar for
Member Avatar for triumphost

I've been trying to do this for some time. I can do it with a vector but with a const void*, it crashes badly! My bad code: Bitmaps::Bitmaps(const void* Pointer, int Width, int Height, uint32_t BitsPerPixel) { Pixels.clear(); memset(&Info, 0, sizeof(BITMAPINFO)); width = Width; height = Height; size = ((width …

Member Avatar for triumphost
0
185
Member Avatar for lim9I

#include<iostream.h> class ADTqueue { private: int queue[10]; int head,tail; public: ADTqueue() { tail = -1; head = 0; } int empty() { if(head == tail+1) return (1); else return (0); } int full() { if(tail == 9) return (1); else return (0); } void append(int num) { if (!full()) { …

Member Avatar for rubberman
0
224
Member Avatar for satishchavan170
Member Avatar for 45lbplates

I'm a beginner so bear with me. I have a string and in it there is a character I want to remove. What is the best way to remove it? The shit I've found on the internet, it's making my head explode. I found this: str.erase(std::remove(str.begin(), str.end()), str.end()); Why is …

Member Avatar for vijayan121
0
5K
Member Avatar for poloblue

Good Afternoon, I'm fairly new to C++ programming, right now I'm having difficulties completing an assignment that consist of a student database. I really appreciated if someone would help me or give me some guidelines to complete the assignment. The assignment consists of that the database only generates one text …

Member Avatar for deceptikon
0
192
Member Avatar for queos

please help with this program. I need to calculate the highestSalesand the averageSales using float funtions and displayOutput using void, I wrote the program but I can not get the output I get a lot of confusion. please help. when I'm trying to compile i get the error cpp:5 too …

Member Avatar for Bob
0
131
Member Avatar for lmsmi1

http://www.daniweb.com/software-development/cpp/threads/267174/vigenere-cipher Read that. Was the full, complete code posted? If so, can I get a link or code? I want to refer to this when I get stuck with my project.

Member Avatar for rubberman
0
572
Member Avatar for Sasquadge

Hey guys I'm new to programing and I made a program to solve quadratic formula but it doesn't work with imaginary numbers when the number is negative I get something like this -1.#IND. What can I add or adjust in my code to help get the program to show imaginary …

Member Avatar for rubberman
0
2K
Member Avatar for Dudearoo

**Dudearoo** *Useing Code::Blocks* Hey Guys! ive got a question, How can you find a string and then print after it?? ive searched google high and low and came out with nothing. What i want to do is to read a string(StringONE) and see if an other string(StringTWO) is in that …

Member Avatar for Suzie999
0
245
Member Avatar for sona123456

my question is to Create a program to add sines and cosines of frequencies and plot them visually.eg addfreq out.jpg sin 0.2 cos 0.4 cos 0.7 This command will plot three curves (using different colors) and plot their sum as well at different discrete points.image magick++ is also to be …

Member Avatar for np complete
0
133
Member Avatar for loshan.moonsamy

Problem: The statement ++Chequebook1; should increment the member variable Balance of Chequebook1 by R100. Give three different implementations for the overloaded operator ++ to accomplish this: • using the member function Adjust() • implementing the overloaded operator ++ as a friend function • implementing the overloaded operator ++ as a …

Member Avatar for np complete
0
171
Member Avatar for superchica08

hello everyone I was wondering if anyone could explain big-oh estimate to me for c++ data structures. I do not understand it that much and does anyone know of any good websites that have good information on c++ data structures i would greatly appreciate it. Also could anyone explain to …

Member Avatar for superchica08
0
268
Member Avatar for Secone

Here's the entirety of my code. The problem I'm having trouble with is in the sortArray function. The first part of that function is used to sort the words gathered in a text file from A to Z, the second part is meant to find any duplicate words, ie 'a' …

Member Avatar for Secone
0
218
Member Avatar for Secone

I'm trying to have my program find duplicates in an array of strings, and if it finds one, it swaps the duplicate to itemamount - 1, adds +1 to the WordAmt for that word, and moves the loop one spot down. I just am not sure how to properly do …

Member Avatar for VernonDozier
0
233
Member Avatar for JudyBetch

So my task was to write a boolena method to count the number of live neighbour of a cell t is a 2D boolean array with a row and column position, i have to count the number of surrounding cells that contain the value true. So the index number given …

Member Avatar for deceptikon
0
188
Member Avatar for anuran

im using this code to send strings to serial port but this is very slow,the other end of communciation arduino board is not able to get those strings at realtime,how can i fasten this communication? there is no problem in arduino board or arduino code,it works fine for its sample …

Member Avatar for anuran
0
321
Member Avatar for lmsmi1

I saw a thread here and didn't want to gravedig. I am a member of Hackforums.net, but no one there will help me. The code I saw involved multiple IFs inside a FOR loop. Now my question is, is there a working Caesar cipher I can refer back to when …

Member Avatar for np complete
1
181
Member Avatar for r0vanz01

I am trying to output an arbitary double number (which might be negative) using only the printDigit for I/O, but when I run this program and you enter in a number is doesn't output anything. #include <iostream> using namespace std; void printDigit( int n ) { cout<< n; } double …

Member Avatar for np complete
0
706
Member Avatar for muhammads

Hi, I am having this problem when i try to execute the .exe of my application "Debug assertion failed !, Expression invalid null pointer" After a bit of googling i think so i know where the problem lies, but have no idea how to solve it. Below is the relevant …

Member Avatar for np complete
0
255
Member Avatar for Tinnin

Hi all, I'm trying to set up a typedef for vector type in a header file I've named Container.h The struct is called Student_info and is in a file called Student_info.cpp with header file Student_info.h My code in Container.h is as follows; #ifndef GUARD_Container_h #define GUARD_Container_h #include <vector> typedef std::vector<struct> …

Member Avatar for NathanOliver
0
231
Member Avatar for Secone

I'm trying to use a while loop to read in some files, but it only reads once and quits. Not sure what's wrong, professor says this is how it should work as long as I'm understanding him correctly. void populateStruct(ifstream &filein, WordStruct Words[1000], int &itemamount) { while (filein >> Words[itemamount].Word); …

Member Avatar for Secone
0
164
Member Avatar for triumphost

How can I get a DLL's Parent Window Title? OR How can I get the PID of the process that loaded my DLL? I need this so I can make a file for each process that loads my DLL but the file has to contain some sort of identifier. Something …

Member Avatar for Ancient Dragon
0
347
Member Avatar for johnray31

Hello friends, I was trying to brush my programing skill and was not able to get answer of "why array size is different inside function solution1?" Inside main, size of array is 11 but inside solution1 its size is just 2. Here is my code... #include <iostream> #include <stdio.h> using …

Member Avatar for johnray31
0
176
Member Avatar for owenransen

I want to port some graphics applications in C++ which compile to Windows Executables to run as WEB apps. I don't want to throw away all the code I've written in C++, so it seems to me that Microsoft Azure would be prefect. My idea is that I learn to …

Member Avatar for owenransen
0
195
Member Avatar for dreday92

// Can Someone help me with the last function at the bottom. I am trying to display the top scorers, not just top scorer. If someone could point me in the right direction it would be greatly appreciated. #include <iostream> #include <iomanip> #include <string> using namespace std; struct Players { …

Member Avatar for WaltP
0
286
Member Avatar for ShEeRMiLiTaNt

Hello, I need to write a program to take in a name (max 101 characters) and out store in into an array so that I can output it like a list. These 2 programs are apart of a bigger program that keeps asking if you want to add another name …

Member Avatar for VernonDozier
0
332
Member Avatar for olusegun.oluwadamilola

A student was arrested for drunk driving. There was some confusion during the arrest, which lead to the student's blood not being tested for alcohol level. The student was taken to the police station and at the station he was tested using an A.L.T. program. The A.L.T. program was developed …

Member Avatar for np complete
-2
81
Member Avatar for muhammads

Hi, I am totally new to lib png and png++ and have recently made my first project with these on linux. But have no idea how to use png++ on windows. I have my libpng configured on windows and am wondering how to move towards making png++ available and running …

Member Avatar for muhammads
0
995
Member Avatar for krishal.lad

The following are the requirements of the program and all code can be written within one C++ source file for the purpose of this assignment. 1. Declare three structs to store Athlete, Event and Registration details. The struct definitions are provided in Appendix 1. 2. Write the driver code (main) …

Member Avatar for Bob
0
801
Member Avatar for cool_zephyr

Could anyone tell me how to make a BSP tree?? like what things should i consider to implement it?? i'd be grateful if anyone gave me a list of basic steps to implement it..thank you

Member Avatar for cool_zephyr
0
139

The End.