Beginners - October 2014 (Page 66)

by hhhr
matrix
 
Im having trouble with getting this function to work. It is supposed to return true if 3 elements in row in the matrix are the same(vertical or horizontal). Can...
[4 replies] Last: did this work for you? because it always returns true (by hhhr)
whats illegal
 
please help me whats illegal in c++
[4 replies] Last: if(illegal==bad) result = twoyearchildscode; else result= not... (by anup30)
by davez
Expand array
 
is it possible to add new elements to a array?without using vector?
[3 replies] Last: int *pt = new int ; // ... delete pt; int *pt = new int ; //actual... (by anup30)
by davez
editing elements of 2d array
 
is it possible to edit the contents of a 2d array? how
[11 replies] Last: im already able to do those exercises (by davez)
by wolfv
compile error: invalid conversion from 'Row<3>* const*' to 'RowBase* const*' [-fpermissive]
 
I am getting this compile error on line 34: invalid conversion from 'Row<3>* const*' to 'RowBase* const*' [-fpermissive] What is invalid about the conversio...
[12 replies] Last: That was it! Thank you so much for your help MiiniPaa. This works: #... (by wolfv)
Help with SDL sprite animation using SDL_Event
 
What I'm trying to do is have a function that returns the correct animation based on the key input of the user. This is a few snips of what I have. //the d...
[5 replies] Last: Don't call the cGameLoop destructor explicitly. It will be called auto... (by Peter87)
What is the difference between enum and enum class?
 
From my understanding, enum declares a bunch of identifiers with an internal integer value starting from 0, 1, 2, 3... (so on). But isn't the enum class basical...
[3 replies] Last: Because it is strongly typed. Even though it has an internal type, rem... (by TwilightSpectre)
changing private reference through external function?
 
Hey guys, quick question. How would I be able to change a private variable from one class in an external function, something like a reference. Here is my code a...
[3 replies] Last: Thanks guys, I realize this question has answers much simpler than I a... (by bryan177mcsc)
Need help with plinko
 
I'm supposed to make a plinko simulator for my class. I've been working on it, but for some reason the random number generator doesn't seem to work. When I run ...
[1 reply] : Lines 49, 52, 56 and 59 all use assignment in an if condition. Is tha... (by cire)
char sentinel value in a switch structure!
 
Since this is an ongoing project, I am only going to post the beginning of my code. I have a switch structure which the user loops through with an int value. Ho...
[1 reply] : I'm not fully sure of what exact error that you are getting, but the i... (by TheKingOfTyrants)
small problem with finding equation of line when user enters negative points
 
I created a program which calculates the equation of a line for the two points that the user inputs for one of my computer programming assignments, however some...
[5 replies] Last: the reason why i declared the character punct is becasue my professor... (by closed account 48T7M4Gy)
by BigPun
I want to set std::cin to the function value
 
I want to streamline my code by having the user's input be = to the value of the function's parameter without having to declare a larger scope variable. Somethi...
[11 replies] Last: Oh wow! I didn't know that JL. Thank you so much. That's exactly what ... (by BigPun)
Capitalizing first letter in string array
 
I'm writing this code and I don't know how to capitalize the first letter of each string in the array. Does anyone know how to do this? Here is my attempt, this...
[2 replies] Last: Thank you, I really appreciate it. (by Juan3273)
Attempting to write functions, getting errors
 
Hi Im trying to write a program where I write and use my own functions to calculate time in seconds. I need to calculate time in seconds of two separate user i...
[1 reply] : int calcSec(int hr1, int min1, int sec1) { int hour = hr1 * 3600;// ... (by closed account 48T7M4Gy)
Really don't get this function thing
 
Yeah, this program doesn't work like its supposed to. Basically, its required to have 4 functions, 2 of them void, one of them returns a string and another r...
[4 replies] Last: You are a life saver. Perfect, that's exactly what it was. They turn g... (by Culbrelai)
Ofstream is not making an output file (1,2)
 
Hello everyone, I'm new to the forum world as I have generally in the past just scrolled through them rather than ask for help but today I am desperate for h...
[21 replies] Last: Ok I tried something today where I replaced the code in the solution t... (by RiLee92)
error LNK2019 and LNK1120
 
I am getting these two errors: error LNK2019: unresolved external symbol "public: class Store __thiscall Store::createStore(class std::basic_string<char,stru...
[3 replies] Last: You're welcome. You should also read the tutorials on this site. There... (by giblit)
Compiler error ISO C++ forbids initialization
 
The compiler is giving me an error: iso c++ forbids initialization of member 'raceFinish'. Is there anything I'm not doing here? #include <iostream> #i...
[2 replies] Last: line 48 is the problem. you can only initialize a data member from... (by shadowCODE)
by JJRR26
The Sieve of Eratosthenes Algorithm
 
Hello, The algorithm consist in that the user give a number (n) and the program have to find the prime numbers and the multiples of it, and when it finds the...
[15 replies] Last: @ JJRR26, as i mentioned earlier you cannot use any random number algo... (by anup30)
help with assignemnt plz
 
how would i print a upside down right triangle formed with "*"? The number of rows in the triangle would be determined by user input. Something like this: *...
[3 replies] Last: add if((a-b)==d){ cout<< '\n'; continue;} (by anup30)
October 2014 Pages: 1... 6465666768... 70
  Archived months: [sep2014] [nov2014]

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