Beginners - October 2016 (Page 43)

by kidush
reading characters using structures and pointers
 
I am reading characters using structures and pointers, i am not allowed to use string. I need to use something like this code below, that wraps the text in case...
[no replies]
Ignore
 
Im trying to paste my code on to here so i can use the code block section in my lab report. void setup() { // initialize digital pin 11 as an outpu...
[6 replies] Last: #include "TimerOne.h" int sensorValue; void setup() { Serial... (by tehenson21)
by jycpp
Trying to understand tallying an array
 
The goal for my assignment is to create an array of size 6 which initially is all 0. The next step is to roll a die 6000 times, logging in each number that is r...
[9 replies] Last: I changed the num_array to the array_size length and it's working, tha... (by jycpp)
Loop
 
I have to write a loop code that sorts the inputs from a user from lowest to highest when they enter 2 separate integers. This loops 3 times. Then at the end it...
[3 replies] Last: As far as I can see, cire answered this correctly, I modified your pro... (by closed account LA48b7Xj)
by Lado
Transpose 2 2d dynamic array
 
I´m writing a void function to transpose a matrix and this is what I have:
[1 reply] : Have a look at the output of this code. I think you will find that you... (by Nico)
after VS2005 -> VS2010 can"t open DLL
 
Hi, I am upgrading a huge solution from VS2005 to VS2010. In this solution, 4 projects built DLL. But I can't open them ! I get an ASSERT alert when I try...
[no replies]
by Lado
Reversed 2d dynamic array
 
I´m writing a program that user inputs number of row and columns of a 2d dynamic array and inserts the number in the matrix and the programs prints out the ori...
[3 replies] Last: void mirror_arr(int **arr, int row,int col) { for (int i = 0; i ... (by SakurasouBusters)
setting string fields from file in multi-file program
 
Working on a class project were I was given a header, txt file, and a cpp file. I have to create a driver cpp file that holds main and uses the loadData(create...
[7 replies] Last: @jlb, I stand corrected bad choice of a word. I was thinking along th... (by Handy Andy)
understaning recurssion and unwrapping
 
I would like to understand exactly how the fibonacci sequence is obtained, given that a recursive c++ function unwraps itself for each iteration. for example th...
[no replies]
input and range validation using strings, regular expressions, and lexical casting
 
Hello, I'm new to C++ and I would like some tips on this overloaded type generic function template I wrote which does input and range based validation using ...
[1 reply] : It appears to be fine. Two small concerns that you may want to addres... (by JLBorges)
by sheel
Problems with customized header
 
Hi Guys, I was trying to learn creating headers. I just created a file Class.h and include iostream in the header instead of the .cpp file. When I tried to com...
[3 replies] Last: Aren't all the headers included in a header file accesible by the .cp... (by Moschops)
by sheel
Copy array from pointer
 
Hi Everyone. I am a beginner to C++ and am trying to understand pointers and arrays. I have created a function 'myfunc' that processes an array and returns a p...
[8 replies] Last: Thanks krako, I am now marking this thread as solved. (by sheel)
Grabbing the numbers from a string and storing them
 
How would I go about grabbing numbers in a string and storing them into a variable? Example: A user inputs longitude and latitude along with the locations name...
[1 reply] : How do I read each line: user input: http://www.cplusplus.com/referen... (by Nico)
by vvv
How to read a binary file to a vector of vector vector structure
 
I have to read the data from finary file which is in the form std::vector<std::vector<std::vector<sphere_data> >> Sphere_image into std::vector<std::vector<std...
[2 replies] Last: I have to store data in a matrix where at every position example (0,0)... (by vvv)
Derived classes and virtual
 
If I have a base class, derivedOne class, and a derivedTwo class, where the derivedOne class is derived from the base class and derivedTwo class is derived fr...
[1 reply] : The keyword virtual determines that the function pointer will be liste... (by coder777)
Exit was not declared in this scope
 
Hello everyone, I'm new to C++ and I was going through some example programs from my textbook involving nested ifs inside loops. I took this program straight ...
[1 reply] : The simplest way of knowing whether or not a number is a prime number ... (by SakurasouBusters)
Help with for loop question.
 
Write a C++ program that uses a fixed-count loop of four. For each pass through the loop, enter the fluid's viscosity and density from the following chart. Your...
[5 replies] Last: Ok lets start off with this. #include <iostream> // for cin and cou... (by Izink)
by Lado
Using void function to read into and print out 2d dynamic array
 
Can someone show me how put the code here into void functions and change it to dynamic arrays. Function for to read into array and a function to print out the a...
[1 reply] : These three sites will help you figure out what your trying to do. ht... (by Izink)
by hafez
need to turn compChoice, userChoice,and determining winner to functions?
 
#include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main() { int PlayerChoice; int compChoice; void Intro()...
[1 reply] : Have a look at: http://www.cplusplus.com/doc/tutorial/functions/ (by Izink)
by Hengry
Initialization syntax question
 
So I have a base class and a derived class, and I'm confused how the initialization syntax works in the code Base class class Instructor { publi...
[2 replies] Last: I think it'll be easier for me to understand if I can see it without t... (by Hengry)
October 2016 Pages: 1... 4142434445... 51
  Archived months: [sep2016] [nov2016]

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