Re: Shared Printer Problem Hardware and Software Microsoft Windows by Bunker Network hiccup, paper jam, or driver glitch - troubleshooting the shared printer quandary demands patience, tech-savvy finesse, and perhaps a dash of printer exorcism. 'Prepare for the Earliest Possible AGI Deployment Scenario' Community Center by Johannes C. **Despite the uncertain timeline for Artificial General Intelligence (AGI) becoming a reality, we need to assure responsible and ethical development today – says Jen Rosiere Reynolds.** ![header-agi-talks1.png](https://static.daniweb.com/attachments/4/5595ff2ec36fde155011d21ea73dcd78.png) As part of our new **AGI Talks**, experts from … Re: DaniWeb Auto Answer A.I. feature Community Center Meta DaniWeb by toneewa I did some sample testing, and parsed a thread topic for the dataset. Reducing the footprint from 220kb to 26.5kb. All in 0.43 seconds. It doesn't use any API. Just the patterns I saw in the code. It took another 6 seconds to embed too Chat with RTX. Then, not deducting for the deleted threads, this could be a lot smaller, and quicker than … GCC Fails to Recognize Parameters Programming by snah19 RE: ffmpeg-4.4 Andrew Wu DJGPP CROSS COMPILER, GCC v12.2.0 Host Macbook Pro, macOS Monterey [Click Here](https://ffmpeg.org/platform.html#DOS) DJGPP Cross Compiler 12.2.0 Fails to Recognize "certain" Parameters in FFmpeg Source Code Hi, I am using the DJGPP cross compiler 12.2.0, developed by Andrew Wu, github, to build the … Re: Where do you find the best friends? Community Center Geeks' Lounge by simhakidsden Good friends can come from anywhere, even in unexpected places and situations. They may be found in school, work, community activities, or even online. Genuine friendship is not limited by physical location but rather emerges from shared interests, values, and mutual understanding. Ultimately, the strongest friendships develop from authentic … Re: Which social sites is best for SEO? Digital Media Digital Marketing by dennyfontaine There is no definitive answer to which social sites are best for SEO, as different social platforms may have different advantages and disadvantages depending on your goals, industry, audience, and content. However, some general factors that can affect the SEO value of a social site are: • The size and engagement of the user base • The … Re: GCC Fails to Recognize Parameters Programming by Reverend Jim I can't offer any suggestions other than to just download the compiled app for your system instead of building it yourself. Re: GCC Fails to Recognize Parameters Programming by rproffitt Here's another problem. When we change the OS not only must we setup the compiler, environment and such but sometimes an OS API could be deprecated or removed. You made mention of a possible OS change so that's a possibility. You obtained this code from somewhere. Go back there and see if they updated it for your new OS. Re: GCC Fails to Recognize Parameters Programming by toneewa While I haven't used DJGPP for a couple decades, I decided to install the ffmpeg library and do a test program another way. For me, the declarations worked changing: #include "os_support.h" #include "avformat.h" #include "internal.h" #if CONFIG_NETWORK #include "network.h" #… Boost shared ptr construction Programming Software Development by Niner710 … be derived from class TestSuperClass. I will then used a shared_ptr to point to the class and will use a map… correct subclass of TestSuperClass. [code] Blah.h file typedef boost::shared_ptr<TestSuperClass> TestClassPtr_t; typedef std::map<std::string… How do I set shared ptr to NULL Programming Software Development by Niner710 Hi, I have a simple question on trying to set shared ptr to NULL. I get an error(binary '=': no operator found which takes a right hand operand of type 'int') when I do this... [code] typedef std::tr1::shared_ptr<A> A_smrt; A_smrt = NULL; [/code] Why is this wrong? Re: design patterns using C++11 Programming Software Development by mike_2000_17 That is a nice little find. I didn't know that shared-ptr had this behavior built-in. But now that I think about, it makes perfect sense. One of the required features of shared-ptr is to be able to share ownership of one object through different shared-pointers which could be different kinds of pointers (to different base classes or data-members), … Re: design patterns using C++11 Programming Software Development by triumphost ….com/questions/3899688/default-virtual-dtor/3899726#3899726 Apparently `shared_ptr` is implemented in such a way that the virtual …even possible.. Does not work for anything other than a `shared_ptr`. @OP, I am fairly certain you would be leaking…if it wasn't for the accidental choice of using `shared_ptr`. I guess that might make it `safer` to … Re: shared_ptr and variadic template Programming Software Development by mike_2000_17 …template <typename T> class shared_ptr { public: shared_ptr() = default; shared_ptr(T* point): p(point) { ++count; } shared_ptr(T* point, std::function<void(…T*)> rem): p(point), del(rem) { ++count; } shared_ptr(const shared_ptr<T>& val): p(val.p), count(val… Re: shared_ptr and variadic template Programming Software Development by mike_2000_17 > doesn't if(--count) is equal to if(--count == 0) No, they are exactly opposite. If you having any integer or pointer variable, call it `a`, then writing `if( a )` is equivalent to writing `if( a != 0 )`, because any non-zero (or non-null) value converts to `true`, so, `if(a)` is true as long as `a` is not equal to zero. > I thought the … Re: shared_ptr and variadic template Programming Software Development by mike_2000_17 We need more detail. You say you are using a custom version of shared-ptr, and the error seems to be in that custom class. So, we need to see that code, otherwise there is really no way to tell where the error might come from. Re: Shared products DB between multiple Magento installations Programming Web Development by LastMitch >Shared products DB between multiple Magento installations FYI - I will not email you. Can you be more specific? I think the question you post is a bit confused it's not multiple Magento installations, it multiple domain (Magento websites) sharing one database. I assume you are using a free edition? You need this: http://www.… Re: Use of (ptr -arr) in the following code Programming Software Development by ravenous > ptr is a pointer to first position in array and arr is pointing to where number 33 exists in array. so (ptr-arr) is the offset from begining of the array where 33 exists (probably equal to 2). Almost. You have `ptr` and `arr` the wrong way round in this explanation :) In C/C++, an array declared as: int arr[] = { 5, 4, 3, 2, 1 }; … Re: Use of (ptr -arr) in the following code Programming Software Development by |\|asrin *ptr* is a pointer to first position in array and *arr* is pointing to where number 33 exists in array. so *(ptr-arr)* is the offset from begining of the array where 33 exists (probably equal to 2). pointer Programming Software Development by daredevil786 *ptr++ and ++*ptr are they representing the same expression if not then how they are different according to precedence ? pointer to char array Programming Software Development by harish9 *ptr = 'hello world"; if we try to modify the content the result is undefined when i worked with gcc in unix. But i can modify the content in Turbo c. How it worked i got confussed. Re: Something behind array and pointer Programming Software Development by ram619 ptr-p should return a address. But here its returning data ? For ,*ptr-arr, lets say arr is pointing to address 200 ptr after ptr++ points to 204, then *(ptr-arr) would turn out as *(4) ? Re: Something behind array and pointer Programming Software Development by deceptikon > ptr-p should return a address. But here its returning data ? Subtracting two pointers returns the difference between the addresses, not another address. Re: Pointers related ~_~ Programming Software Development by Moschops `ptr` is an object of type char*. `&ptr` is a pointer to the object ptr, so an object of type char** (pointer to a char pointer) `*&ptr` is the object that `&ptr` is pointing to, so it's ptr again. So `*&*&ptr` is the same as `*&ptr`. Do that again, and it's clear that `*&*&ptr` is the same as `ptr` So `cout <<… Re: c incompatible types in assignment Programming Software Development by Ancient Dragon ptr[i] = malloc(sizeof(the_struct)); should be this: `ptr[i] = malloc(sizeof(struct the_struct));` Occasionally I confuse C and C++. In C++ the keyword **struct** is not required. Sorry for the confusion. Re: Capitalize first char of every word in input string Programming Software Development by Narue >*ptr = toupper(*ptr); You forgot to include ctype.h. >/* first letter of string */ This is a benign logic error. The end result is that it doesn't cause a problem if the first character in the string isn't a letter, but the fact that you always do it suggests a flaw in your thinking. >/* going thru string */ This is not a benign logic … Re: virtual methods and inheritance Programming Software Development by Stoned_coder ptr.speak(); ptr.move(); ptr.printName(); not . its -> Re: Structure Pointer issue Programming Software Development by myk45 ptr is incremented in line number 18. So, ptr points to a + 1. So, ptr->p is a + 2. Therefore, ptr->p->i = *(a + 2).i Re: corruption of the heap Programming Software Development by Ancient Dragon >>ptr=(unsigned char*)malloc(5*sizeof(unsigned char)); you are only allocating 5 bytes to hold 5 integers! and ptr needs to be an int pointer, not a char pointer. Change that line to [icode]int* ptr= malloc(5*sizeof(unsigned [color=red]int[/color]));[/icode] Re: [pointers] Member Access Operators: . and -> Programming Software Development by Ancient Dragon ptr[i] is not a pointer, so you need to use the dot operator . SetState() only needs one parameter, now twom In main() you would write this: for(int i = 0; i < 100; i++) A[i].setState(n); And setState() simplifies to just one line void State::setState(int num) { *state = num; }