Beginners - February 2016 (Page 32)

Efficiently Comparing two Bitmaps (Pixel Arrays)
 
I have a bitmap stored in an array (unsigned char* lpPixelArray) which is taken via WinAPI (Screen-shots). I was wondering how efficient my current method of co...
[3 replies] Last: Also it seems my class might benefit from the copy and swap idiom wrap... (by Jack Hammered)
2D Array
 
I'm suppose to read a file in(which is in hex), store the data in a 2d array, and write the data in binary to another file. I think that my input and output fil...
[3 replies] Last: I didn't say to declare it a certain size. At some point you have to ... (by cire)
Program to print a median.
 
Hey, everyone. So my program is supposed to print the median of five numbers inserted and upon compiling and running it, it prints all five "if" statements rega...
[8 replies] Last: Oh okay, gotcha. I'll go look at stuff on arrays and see if it helps. ... (by dnorton)
Geometry Calculator need help
 
nvm
[1 reply] : I'm not seeing a question. (by helios)
Carpet cleaning program help needed
 
Hello this is my first post on this forum :). Can anyone please help me with my code? There seems to be a problem in both the Calculation of my data and my swit...
[1 reply] : Here's a sample output... Please enter the length of the carpet in fe... (by swaggerCompSci)
Undeclared Identifier. How to fix?
 
So i don't know why i am getting undeclared identifier for yesnochoice in the while loop int main() do { int- - - string - - - string yesnochoice; code c...
[6 replies] Last: thanks for the help! (by phsyrik)
by rantiv
Format
 
I need to make the path look like this. "Which slot do you want to drop the chip in (0-8)? 4 *** DROPPING CHIP INTO SLOT 4 *** PATH: [4.0 4.5 4.0 4.5 5....
[no replies]
Comparing Arrays
 
I need to know how to compare the elements in two arrays. Like a one-to-one comparison, both of the arrays don't need to be 100% equal Like for 2485 and 3495...
[1 reply] : int arr1 = {1,2,3}; int arr2 = {5,3,4,2,1}; for(int i = 0; i < 3; ... (by TarikNeaj)
Help with Looping
 
So I need to write a program with menu, but the menu needs to loop after a certain input is entered. I'm think a do-while loop would work but I am unsure of how...
[3 replies] Last: You have switch, you need to add loop: bool rerun = true; while (rer... (by naaissus)
Lottery Program
 
Visual Studio won't tell me my errors right now. Could anybody help me with this lottery program? #include <iostream> #include <cstdlib> const int LOTTER...
[2 replies] Last: Okay, sorry about the code tags, thank you! (by quietpupil)
by Wheezy
Math
 
Ok so I want my program to calculate the math once a user imputs how many pallets they are receiving. I am having trouble with this. The questions pop up and th...
[7 replies] Last: Of course it didn't work, what you have above won't even compile. You... (by mgoetschius)
Write to data file
 
Hi, I am trying to write an entire struct into the binary data file. I have programmed this successfully in the past(way back) and I've also checked all on t...
[4 replies] Last: Thank you jlb. you make me think and I found the error. All was perfec... (by Cyberduke)
Multi dimensional Vector/Array
 
okay so this method reads in the integer values one, two, three multiple times with different values. (think of it as passing in different permutations!) Belo...
[6 replies] Last: [quote=TheIdeasMan]The example shows sorting, not sure if that would b... (by TheIdeasMan)
How to pass a pointer struct to a function properly?
 
Hello, I have several functions in which I am trying to pass an element of array of pointers (which contains structures (records)). I'm having trouble doing thi...
[1 reply] : changeAssignmentGradeForStudent(changedStudent, aNum, gradeChange); ... (by Moschops)
NULL must be defined?
 
For some reason, my code requires NULL to defined. This is a first for me. I thought NULL was always already defined to 0. paged.h #pragma once // A...
[2 replies] Last: http://stackoverflow.com/questions/924664/why-is-null-undeclared (by Thomas1965)
by Ganado
Read 32-bit signed vs unsigned integer from file
 
I have a binary file that contains the number 44100 encoding into 4 bytes. The file, in binary format, is the following bytes: 68 172 0 0 . The problem wa...
[8 replies] Last: Thank you! You all are right, the problem was the int8_t for the indiv... (by Ganado)
by Oboher
cout a char* function only prints address
 
I have this function to concatenate two const char*, but I'm having a lot of trouble managing to get the right return of the function. #include <iostream>...
[4 replies] Last: @AbstractionAnon, you are absolutely right. I should not write code w... (by Thomas1965)
String Arrays
 
Helleue :) I am trying to create a quiz where the user can set their own questions, and answers, and what i want to do is having the users questions and answer...
[2 replies] Last: Wow, didn't think i would miss the line 13 thingy, anyways thank you s... (by olsarets)
Returning multiple values
 
I was thinking of putting in functions for enemy encounters. Something like: //enemy.cpp int encounter1 (int hp, int ammo) { //... //... //... retur...
[3 replies] Last: @Tarik Thanks! I am looking forward to use those :D @naaissus I will ... (by TheLoneWolf)
by kvway
Loading an ugly input.
 
Could anyone tell me how to load this input in the most elegant way possible ? I just need to know how to load it and possibly when the input is not in the give...
[1 reply] : This "ugly" input looks like JSON. One way would be to look for an JS... (by Thomas1965)
February 2016 Pages: 1... 3031323334... 46
  Archived months: [jan2016] [mar2016]

This is an archived page. To post a new message, go to the current page.