Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
private
- Page 1
McCharts - ArkTS
Programming
Software Development
1 Month Ago
by 杨_659
…', cSpace: 20, data: [] } @Component export struct McLineChart {
private
settings: RenderingContextSettings = new RenderingContextSettings(true)
private
context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) @State options…
Re: How secure is Github?
Programming
Software Development
1 Month Ago
by Dani
> https://www.theregister.com/2025/03/17/supply_chain_attack_github/ Well that’s coincidental. Doesn’t seem to apply to our repo though because we don’t use tj-actions/changed-files and use
private
repos. More to say when I’m not on my phone.
Re: Are their any alternatives to github?
Programming
Software Development
1 Month Ago
by Dani
The only one I know about is Bitbucket. What is your use case? Are you looking to host public or
private
Git repositories?
Re: ‘Advanced AI should be treated similar to Weapons of Mass Destruction’
Community Center
2 Months Ago
by rproffitt
UPDATE: Feb 4, 2025 — Google on Tuesday updated its ethical guidelines around artificial intelligence, removing commitments not to apply the technology to weapons or surveillance.
Private Sub cmdprint_Click()
Programming
Software Development
14 Years Ago
by junjun61991
Private
Sub cmdprint_Click() i am searching the code of the command button for printing, at the above.. now, the textidno.text = textborrowersname.text = what is code after the " = "
Re: private inheritance
Programming
Software Development
19 Years Ago
by Stoned_coder
private
inheritance has its uses. It is similar in effect to composition and nothing like public inheritance. When you become more familiar with c++, you will often find uses for
private
inheritance.
Re: private attributes in python
Programming
Software Development
14 Years Ago
by jcao219
Private
attributes are stupid for dynamic languages. Don't you see … is a [I]feature[/I]. Even
private
attributes in static languages are not absolutely
private
. In C#, I know that you can… use Reflection to use
private
methods from another class.
Re: private VS protected
Programming
Software Development
10 Years Ago
by DonnSchwartz
private
The type or member can only be accessed by code in the same class or struct. protected The type or member can only be accessed by code in the same class or struct, or in a derived class.
Re: private
Programming
Software Development
13 Years Ago
by stultuske
.exe code? you declare a variable as
private
to increase encapsulation. also, this makes sure you control how … access the value of the variable. when they're marked
private
, the value of the variable can only be changed or…
private
Programming
Software Development
13 Years Ago
by asterix15
what is the use of making a variable public. After all the client is provided only with the .exe code So now whats the actual use of maling a variable
private
?
Re: private
Programming
Software Development
13 Years Ago
by asterix15
so do u mean to say that their use is purely for the convinience of the programmer in designing the code ? If i can use public and design a program carefully(although a bit inconvenient) then can i completely avoid using
private
?
Re: private
Programming
Software Development
13 Years Ago
by stultuske
…][B]if and only if[/B][/I] it was a
private
variable, but what if it's public, there's no…
Re: private
Programming
Software Development
13 Years Ago
by JamesCherrill
…(although a bit inconvenient) then can i completely avoid using
private
?[/QUOTE] Apart from all the good reasons stultuske gave, you…
Re: private
Programming
Software Development
13 Years Ago
by stultuske
… trouble you can run into: [code=Java] public class PrivateUsage {
private
int numberOne; public int numberTwo; public final int numberThree = 1…
Re: private
Programming
Software Development
13 Years Ago
by stultuske
[B]long[/B] story [B]short[/B], keep your [I]privates[/I] [U]
private
[/U] :D
Re: Private Access
Programming
Software Development
18 Years Ago
by Ravalon
…assumption from the beginning, otherwise you would simply change
private
to public in the code and be done with it… your need quite well. The problem is that
private
members are
private
for a reason. You're not supposed to …of your application for such a little thing as accessing
private
members. [QUOTE=shouvik.d;299549]this is what reusability…
Private method and their use
Programming
Software Development
12 Years Ago
by Nandomo
…', 'A'};
private
char [] student;
private
int [] missed;
private
int numCorrect = 0;
private
int numIncorrect …graded. * * @param * @return */
private
void gradeExam() { totalCorrect(); totalIncorrect(); passed();…
Re: Private Access
Programming
Software Development
18 Years Ago
by Ravalon
…shouvik.d;297066]Say if we ve certain
private
methods along with
private
data members and public methods. other than friend…the cheap n unprofesssional sol is [code=c]#define
private
public[/code] but this unwantedly unveals many non …}; [/code] The default access level of a class is
private
, but your trick won't work with the above class…
Re: Private Access
Programming
Software Development
18 Years Ago
by WaltP
…confused thinking why do i need to access the
private
member. [/quote] No, us ppl r nt…thing to you, and that is "[I]
private
members [b]cannot[/B] be accessed if …the synopsis of the problem 1) you have
private
values in a class and you cannot change …the class 2)
private
values cannot be accessed in a class without…
Private Access
Programming
Software Development
18 Years Ago
by shouvik.d
… thr any other way we access these members(they being
private
only) directly. its one of the requirements in a… is a risky n unreliable job. [code=c] class x {
private
: void meth1() { cout<<"Meth1"; } void…of the cheap n unprofesssional sol is [code=c]#define
private
public[/code] but this unwantedly unveals many non required methods…
Re: Private Access
Programming
Software Development
18 Years Ago
by WaltP
…here's the synopsis of the problem 1) you have
private
values in a class and you cannot change the class… 2)
private
values cannot be accessed in a class without the class…that allow access, you cannot access the
private
values Final result: You cannot access
private
values. They are protected. That's …
Re: Private Access
Programming
Software Development
18 Years Ago
by shouvik.d
… r confused thinking why do i need to access the
private
member. Think of a scenario that u r to develop… an application where u need to just to access the
private
[B]methods [/B]in diff object files by linking them… u r in need to access the
private
methods otherwise the[B]
private
[/B] remains [B]
private
[/B].(mind it i'm defining…
Re: Private method and their use
Programming
Software Development
12 Years Ago
by subramanya.vl
… it is not visible to other classes(because of
private
access modifier). So you can create another pubilc method… that calls
private
method "gradeExam()" like below inside the class….easymock.org/. Easymock provides the api to acess
private
methods and fields of other classes for unit testing.
Re: Private method and their use
Programming
Software Development
12 Years Ago
by stultuske
…'s possible, but would make the
private
method useless.
private
methods are normally used to perform "
private
" stuff. at this point… not want your main method to have access to your
private
method (otherwise he would've told you to make it…
Re: Private method and their use
Programming
Software Development
12 Years Ago
by stultuske
if you're supposed to call them from within a
private
method, you should consider them as being '
private
'. did you get any guiding on what that method should do? if that method is supposed to call those methods, it's calling those methods in your main method that is a waste of memory.
Re: Private Access
Programming
Software Development
18 Years Ago
by Bench
… which stops it. Consider the following code [CODE=CPP]#undef
private
#define
private
public int main() { } [/CODE] On at least 2 different… the fact that a class defaults all its members to
private
. for the OP - Re-read the requirements of your problem…
Re: Private Access
Programming
Software Development
18 Years Ago
by shouvik.d
[code=c] #include <iostream.h> #undef
private
#define
private
public class pvt {
private
: void hi() { cout<<endl<<"hi there"; } }; void main() { pvt o; o.hi(); } [/code] [B]Compiling...[/B] [B]x.cpp[/B] [B]Linking...[/B] [B]x.exe - 0 error(s), 0 warning(s)[/B] in VC++ 6.0 works fine u see.
Re: Private method and their use
Programming
Software Development
12 Years Ago
by stultuske
… be an array public int[] questionsMissed(){ gradeExams(); return this.missed; }
private
void gradeExams(){ this.missed = new int[5]; }
Re: Private method and their use
Programming
Software Development
12 Years Ago
by Nandomo
its an array because it holds the numerical value of the questions you got wrong. and for what you did there i have : makeMissedArray() which is also
private
for same reason i dont understand since it would just be more simple to make a local array in questionssMissed(), but this professor is not very bright.
private inheritance
Programming
Software Development
19 Years Ago
by server_crash
I may not be understanding
private
inheritance right, but I thought…;Print method...\n"; }
private
: void printP() const { std::cout << "
Private
print method...\n"; } …lt; "Dog deconstructor..\n"; } }; class Bird :
private
Animal { public: Bird() { std::cout << "…
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC