- basic oop question - 10 Updates
- wofstream-question - 1 Update
- More about arabs.. - 2 Updates
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Feb 05 07:52PM -0800 On 2/5/2020 12:08 PM, Alf P. Steinbach wrote: > No, A is neither true nor false. > You have just proved it can't be either. So it's neither. > :-) Y tells A the truth about X, how it has major problems... Then Y tells B a lie about X, it works fine. Relative to B, X is true. However, wrt A's perspective X is false. X is both true and false wrt A and B's own personal perspectives due to Y's deception. OR: Y tells A and B a lie about X. Now, both A and B think this false deception is true. |
"Öö Tiib" <ootiib@hot.ee>: Feb 05 11:26PM -0800 On Wednesday, 5 February 2020 17:15:33 UTC+2, fir wrote: > b) Food has a field Window& window > c) Window has a field Snake& snake > Window has a field Food& food That design does not make sense. It is because we do not want to draw only snake or only food, we want to draw everything, empty grass as well. * Snake game is in window, * window has some grid in it, * grid has cells, * cells have states what is there, grass, food or some snake body part. * body parts have direction and orientation. Then there is score that is related to snake's body length and difficulty of game that is related to game's tick speed. Each tick some grid cells transform between states, the transformations may be drawn immediately where those happen or done and then whole grid is drawn. Rest of time game just waits for next tick or user's key press. > numerious tries when i changed the presence of those object from one place to another changed also places where those references were passed 9from constructors to functions), also changed it from references to pointers and vice versa, which involved idiotc changes in > biodies of those object codes..those changes was so utelly crapopy activiry normal language like c dont even know, > thios is simply 'sceptic tank' (pool/pond od shit) for years of c i managed to forget how this shit stinks If your whole point was to complain how hard it is to use C++ then that was waste of time. C++ is not easy language and most other languages can be learned faster than it. |
fir <profesor.fir@gmail.com>: Feb 06 07:42AM -0800 W dniu czwartek, 6 lutego 2020 08:27:12 UTC+1 użytkownik Öö Tiib napisał: > If your whole point was to complain how hard it is to use C++ then that > was waste of time. C++ is not easy language and most other languages > can be learned faster than it. it was not my point, it was side observation (really side) as to sanke it only has its snake and its food (and also a window to place it onto ) so this division hace sense , but this crap (as it showed) language dislaow me to write it relatively rigt (as far as i know) and all the attempts was exceptional torment |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Feb 06 07:48PM On 06/02/2020 15:42, fir wrote: > it was not my point, it was side observation (really side) > as to sanke it only has its snake and its food (and also a window to place it onto ) so this division hace sense , but this crap (as it showed) language dislaow me to write it relatively rigt (as far as i know) > and all the attempts was exceptional torment I showed you what to do in my first reply. The problem isn't C++, the problem is your inability to recognize a cyclic dependency. /Flibble -- "Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin "You won't burn in hell. But be nice anyway." – Ricky Gervais "I see Atheists are fighting and killing each other again, over who doesn't believe in any God the most. Oh, no..wait.. that never happens." – Ricky Gervais "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Byrne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say." |
fir <profesor.fir@gmail.com>: Feb 06 12:25PM -0800 W dniu czwartek, 6 lutego 2020 20:48:30 UTC+1 użytkownik Mr Flibble napisał: > > as to sanke it only has its snake and its food (and also a window to place it onto ) so this division hace sense , but this crap (as it showed) language dislaow me to write it relatively rigt (as far as i know) > > and all the attempts was exceptional torment > I showed you what to do in my first reply. The problem isn't C++, the problem is your inability to recognize a cyclic dependency. yes i know but i get so medical level pgysically frustrated that i cant judge how this could work could yopu maybe write it as a some cnippet of code, compare to my oryginal of what i wanted to have: int main() { Food food(window); Snake snake(window, food); Window window(snake, food); } class Food { Food(Window& w): window(w) {} Window& window; } class Snake { Snake(Window& w, Food& f): window(w), food(f) {} Window& window; Food& food; } class Window { Window(Snake& w, Food& f): snake(s), food(f) {} Snake& snake; Food& food; } tis if work woulnt be yet such bad (not saing it woyld be specially good either) (but as i said this crpappy langage seems to force it only bad frustrating way) |
Paavo Helde <myfirstname@osa.pri.ee>: Feb 06 11:49PM +0200 On 6.02.2020 22:25, fir wrote: > Food& food; > } > tis if work woulnt be yet such bad (not saing it woyld be specially good either) (but as i said this crpappy langage seems to force it only bad frustrating way) Here you are! Compiles fine and all cyclic references are in place! class Window; class Food { public: Food(Window& w) : window(w) {} Window& window; }; class Snake { public: Snake(Window& w, Food& f) : window(w), food(f) {} Window& window; Food& food; }; class Window { public: Window() : food(*this), snake(*this, food) {} Food food; Snake snake; }; int main() { Window window; Food& food = window.food; Snake& snake = window.snake; } |
fir <profesor.fir@gmail.com>: Feb 06 02:14PM -0800 W dniu czwartek, 6 lutego 2020 22:49:48 UTC+1 użytkownik Paavo Helde napisał: > Food& food = window.food; > Snake& snake = window.snake; > } do you checked if tis compile (i got so heavy brain damages las time i dont wona to go so close to tis and check) also: shouldnt i worry when placing objects on stack ? if some get fields of another objects etc (like vecotrs) they may grow bigger in size (esp i hate pointers and woyld not like to use them including new ) also personally i have nothing against making so called 'global' objects so can i put Window window; outside the main as a global making all its succesive fields also placed in global ram? |
fir <profesor.fir@gmail.com>: Feb 06 02:22PM -0800 W dniu czwartek, 6 lutego 2020 22:49:48 UTC+1 użytkownik Paavo Helde napisał: > Here you are! Compiles fine oj sorry i didnt noticed that.. if so i will try it toomorrow but what with this hlobal/non stack placing? (asking as i really dont know this various c++ rules and quirks) could i then generalize this way by only making more and more of such 'objects' all glued by refferences (no pointers) ? i huess fibble gave that answer but as i said i already was to braindameged to 'embrace' it mentally ;c |
Paavo Helde <myfirstname@osa.pri.ee>: Feb 07 12:48AM +0200 On 7.02.2020 0:22, fir wrote: > so i will try it toomorrow > but what with this hlobal/non stack > placing? (asking as i really dont know this various c++ rules and quirks) You should not worry about placing things in stack, except for large arrays (note that std::vector is not an array). But of course, as long as there is only a single object of its own kind, and its initialization does not depend on program arguments, and the object is multithread-safe or it is guaranteed to be not accessed concurrently, and the global initialization fiasco can be avoided, and the hidden data flow through global statics is deemed acceptable, then of course, the object can be made a global static as well. > could i then generalize this way by > only making more and more of such 'objects' all glued by refferences (no pointers) ? Yes, but that would be ponderous. |
fir <profesor.fir@gmail.com>: Feb 06 02:50PM -0800 W dniu czwartek, 6 lutego 2020 23:48:25 UTC+1 użytkownik Paavo Helde napisał: > > could i then generalize this way by > > only making more and more of such 'objects' all glued by refferences (no pointers) ? > Yes, but that would be ponderous. why? |
Ralf Goertz <me@myprovider.invalid>: Feb 06 08:45AM +0100 Am Wed, 05 Feb 2020 16:05:45 +0000 > wos << L'\x0100'; > } > but that's with g++ on Linux not MSVC. Just adding that for this to work with std::wcout one also needs std::ios::sync_with_stdio(false); before the output line. |
Siri Cruise <chine.bleu@yahoo.com>: Feb 05 06:15PM -0800 In article <r1fheg$pme$1@dont-email.me>, > > are you thinking Salma Hayek or Olga the Soviet tractor factory > > worker? > I googled Salma and she's a Mexican-American, not an Arab. Lebanese father. -- :-<> Siri Seal of Disavowal #000-001. Disavowed. Denied. Deleted. @ 'I desire mercy, not sacrifice.' /|\ The first law of discordiamism: The more energy This post / \ to make order is nore energy made into entropy. insults Islam. Mohammed |
Keith Thompson <Keith.S.Thompson+u@gmail.com>: Feb 05 08:53PM -0800 >> > worker? >> I googled Salma and she's a Mexican-American, not an Arab. > Lebanese father. HEY, HERE'S AN IDEA. LET'S STOP USING COMP.LANG.C++ TO TALK ABOUT HOW ARAB SOMEBODY IS OR IS NOT. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Philips Healthcare void Void(void) { Void(); } /* The recursive call of the void */ |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment