Questions tagged [private-functions]
25 questions
0
votes
0 answers
C++ Making functions not accessed by the client private
Here is Main.cpp:
#include
#include
#include "linklist.h"
using namespace std;
void menu(List &);
int main()
{
//new list
List list;
menu(list);
return 0;
}
void menu(List &list)
{
char choice;
int…

David Czerepak
- 25
- 7
0
votes
2 answers
How to use private functions inside macros?
I want to create a macro (to get line number, function name and file name) and then forward this things to another function but that function must be private but problem is that I can't use private functions inside macro.
For example suppose this…

Akshay
- 3
- 2
0
votes
1 answer
Object of class Illuminate\Support\Collection could not be converted to int php beginner
please give me some suggestions on how my code will work properly. I am having a loop that gives me an id and quantity to update every loop into my database.
but i got an error when i pass it to my private function and try to execute it.
I am just…

Jc John
- 1,799
- 2
- 34
- 69
0
votes
4 answers
Javascript modify public properties from private functions
I coded a class in JavaScript, and I'm trying to modify one of my public properties inside a private function.
Here is an example of my code:
MyClass = function(callback){
this.tabs = [];
var tabs_callback = function(){};
…

B 7
- 670
- 7
- 23
0
votes
2 answers
Joomla - call function model within the model
In a public function of my model I call
$user_type=$this->get_user_type();
In the same model I have
private function get_user_type()
{
$user_type='asd';
$asd_groups = (int)$config->get('asd_groups');
$ver_groups =…

ilbassa
- 13
- 2
0
votes
5 answers
Mocking problem, public function calling private function
I’m having a mocking problem. I know only public methods should be mocked. But what do I do when a private method is called in a public method, and this private method is getting data from a file? I want to mock this private method so I could go on…
Unit09
-1
votes
2 answers
Javascript Private Function Assistance
I am having a problem grasping how to make javascript functions/variables private. How would I need to edit this to make the functions/variables private in something like this.