Beginners - November 2015 (Page 28)

How do I modify all elements of a 2D array at once?
 
Hello all, I have a assignment where I'm supposed to take pixel values of an image and invert them by 1 (1.00 - pixel). So I have a 2D Array of 25 pixel values ...
[3 replies] Last: @cire double imageJ = imageI ; imageJ is a single double. You are... (by Thomas1965)
Beginner TEMPlate help
 
I am trying to pass in the same array with different data types using template, I do not see the issue Please help int main() { int arr = { 4, 1, 13, 3, ...
[5 replies] Last: You need a seperate function for that. maxFunction accepts only arrays... (by Thomas1965)
by noodel
BAD RESULT
 
Here's the task: Bank will give family a loan, if every person in the family gets more than (s) money, and also there will be some money left for paying the loa...
[8 replies] Last: Like @FurryGuy said. The problem is that you don't quite know how modu... (by TarikNeaj)
Can't find the problem
 
This code is part of my homework and its almost done, but the problem with the code is that no matter what if the user get only 9 or less out
[3 replies] Last: Thank you guys so much! You guys are my heros you solved my problems i... (by Resogun977)
by fguy
Basic Function pointers
 
The tutorial I am reading, states (in a nutshell) that a function name acts as a pointer to the function. Here is the link. http://www.learncpp.com/cpp-tuto...
[4 replies] Last: I had a feeling that might be the reason. The author is using VS. I a... (by fguy)
HELP PLES!!
 
#include <iostream> using namespace std; main() { int n,i,v ,x,p,s,maxx,sqrt; cout<<"n="; cin>>n; for(i=1;i<=n;i++) co...
[no replies]
program giving a compile time error
 
I am trying to calculate the sum of the series below (line 3). This is what I've come up with. I tried compiling and running it but there is a compile time erro...
[2 replies] Last: what compiler do you use? (by jasonwynn10)
Need help with quick sort
 
So I'm learning c++ and I'm extremely confused by quick sort. I've watched videos and read chapters and I'm still stumped by this assignment. The idea of the as...
[no replies]
Function Argument Help
 
This is the program I'm suppose to build and I'm taking it small steps at a time but I ran into a issue and that's in the main function when I try to call the g...
[5 replies] Last: When I try to display the info (pressing 3) it runs infinite. Also wh... (by cire)
variables from file into stuct
 
Im having trouble getting getting this to work right for me, I need the values of x1,y1... to save into the array of triangles . This is reading from a file, wh...
[no replies]
individual project
 
i am truly lost with this. You are required to create a simple Automated Teller Machine program fully functional using programming constructs and principles ...
[5 replies] Last: Maybe the best for you would be to go through the tutorial here on the... (by Thomas1965)
vector.push_back don't work
 
I am trying to push back elements to a vector, but it doesn't seem to work. I am trying to create a graph. The graph is stored as a vector of edges. Each edge...
[1 reply] : I found my error. I was using range based for loop to manipulate the... (by DrJones)
Program showing wrong output on GCC 4.9.2 compiler
 
I am student of class 12 and quite new to programming. I have a confusion. The below program works well when I compile it using Borland compiler. But when I com...
[3 replies] Last: Now that that has been cleared, it is time to look at another thing th... (by JLBorges)
Algorithm Queue & Stack
 
What would be the contents of the queue Q1? The data are 5, 7, 12, 4, 0, 4, 6, 8, 67, 34, 23, 5, 0, 44, 33, 22, 6, 0 BEGIN Create Queue Q1 Create St...
[no replies]
if else statement with char type didn't work
 
im doing a practical from my teacher, i have a problem here ,the if else statement didn't work for the char type #include <iostream> using namespace std; int m...
[3 replies] Last: Thank you for helping, you are right i make a terrible mistake here (by spdragon)
Max number of every row
 
Hello! I am a beginner in C++, and I'm pretty sure that my problem is really easy to solve, but I don't know how.. I have to create a 2d array with random numbe...
[4 replies] Last: After I'll do that, how to put these max values in it? The same as ... (by dhayden)
Image Processing using opencv
 
I am going to compare two Mat variable. But "Unhandled exception..." keep came out. I have no idea why this happened. LineIterator it(thresholed, Point(0, 8...
[1 reply] : > cerr << buf4.rows << endl; //640 I've got 801 > int nz = cv::co... (by ne555)
while(!file.eof) function going infinite
 
#include<iostream.h> #include<conio.h> #include<fstream.h> #include<stdio.h> class a { int rollno; char name ; public: void mod() { cout<<"Enter ro...
[3 replies] Last: The first loop looks like this: while (!file.eof()) { pos=file.te... (by Chervil)
Passing dynamically allocated array through constructor
 
Below I have a custom constructor, that takes in an array, the array size, and name of the set as per my instructors specifications. However, when I run this pr...
[2 replies] Last: #include <iostream> #include <algorithm> struct Set { Set() = d... (by JLBorges)
class that only instantiate ones
 
so i have a class called Server, i dont need to instantiate it more than one. i only need one Server server thats it should i consider making a class of it...
[5 replies] Last: > does it really make sense to write a class if i will only instantiat... (by JLBorges)
November 2015 Pages: 1... 2627282930... 53
  Archived months: [oct2015] [dec2015]

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