Mar!o
Is qt creator available there
yes it is available on ubuntu - I also had ubuntu before
Mar!o
Sure :)
Anonymous
Hey my college syllabus had given to learn vb.net should i learn it or it's wastage of time bcs vb.net is outdated
Anonymous
Sugfest me should i learn or not ?
MengShu
Hi guys, This is the code snippet from Microsoft's IoT Bustool. This function returned because of the eofbit of getline() was set even though I didn't do anything. Could you give me some tips to solve this issue? This function should wait for user to input commands like help/write/read...etc.
Mar!o
ewww C++/CLI
B
time_t is printing always the same number... It should print a random number between 0 and 20, but it always give me 7.
MengShu
ewww C++/CLI
No, it is C++/CX...
Mar!o
Oh - I see! Sorry looks like CLI because of the XOR ^ as a pointer
Mar!o
why not? for(std::wstring needle; std::getline(std::wcin, needle);) { //Here you can now even move needle }
Mar!o
Thank you Mar!o, I will try this tomorrow.
You are welcome! Happy coding 😜
Alion🦁
Is there anyone hears about C*? @Neko_cpp
Anonymous
is possible created an array of pointers like this:
Anonymous
tablero = new cell[sizeY];
Anonymous
with out using de default contructor
Anonymous
I want to pass a parameter
Anonymous
is it possible in c++?
Mar!o
tablero = new cell[sizeY];
this is not an array of pointers
Anonymous
yep i wanted to simply. in reality is it
Anonymous
*tablero = new cell[sizeY];
Anonymous
but when i do the definition: tablero = new cell[sizeY]; is possible non use the default constructor and pass some parameter?
Mar!o
yup just do: new cell[sizeY](params);
Mar!o
You can also use overloaded or variadic constructors
Zildj1an
I believe that when you embed assembly language in C, GCC allows you to use Intel Style and AT&T style. I was wondering, when it comes to the Linux kernel, which one do you think is better to use? I believe both architectures are fully ported, even-though I don't know what directories in the kernel arch/ are related to those styles. Do you?
Mar!o
I believe that when you embed assembly language in C, GCC allows you to use Intel Style and AT&T style. I was wondering, when it comes to the Linux kernel, which one do you think is better to use? I believe both architectures are fully ported, even-though I don't know what directories in the kernel arch/ are related to those styles. Do you?
I also don´t know what Syntax is mainly used in the kernel, but I think it is AT&T since the GCC compilers default is AT&T. Yes GCC allows it to use Intel syntax - you can specify it at the beginning of an asm block or as global compiler switch
Mar!o
But MSVC has the better inline assembler - we can just use variables within the assembly, in GCC we have to you extended inline assembly and I´m not a fan of that!
Mar!o
And MSVC uses Intel by default - Assembly is not so easy to read by default, and AT&T makes it even harder
Mar!o
https://stackoverflow.com/questions/6491566/getting-the-machine-serial-number-and-cpu-id-using-c-c-in-linux
Mar!o
Look at this thread these is some inline assembly from the linux kernel
Zildj1an
MSVC is out of the choice list, I dont use Microsoft products hehe
Mar!o
I found this recently, where I was looking for a cross platform way to query cpuid. But it´s not possible to tell which Syntax they used
Anonymous
#include <iostream> using namespace std; // base class class Animal { public: void Food() { cout << "Animal eats generic food" << endl; } }; // derived class1 class Dog : public Animal { public: void Food() { cout << " Dog eats flesh" << endl; } }; // derived class2 class Cat : public Animal { public: void Food() { cout << " Cat eats rat" << endl; } }; void PrintFood(Animal *xyz) { (*xyz).Food(); } int main() { Animal *ptr; Cat c1; Dog d1; ptr = &c1; PrintFood(ptr); delete ptr; }
Anonymous
// error
Anonymous
free(): invalid pointer Aborted (core dumped)
Mar!o
free(): invalid pointer Aborted (core dumped)
You are deleting a pointer which points to automatic storage
Mar!o
Only delete pointer pointing do dynamic heap memory
Mar!o
And in the function PrintFood just write xyz->Food() which is Syntaxic sugar for what you´ve written
Anonymous
Only delete pointer pointing do dynamic heap memory
ohh😁 i forget that thanks buddy😘
Anonymous
your welcome 😉
can i dm you later if i face any problem related to c++. i am beginner can you help me for that
Mar!o
sure!
Anonymous
sure!
thanks a lot❤
Mar!o
thanks a lot❤
no problem - everybody was a beginner at some point - so we should help each other out!
.
Hey
.
can you help me with an exercise?
Anonymous
undefined reference to winmain error?
Anonymous
how to fix
.
?
Create a class to represent a battery-operated remote controlled car. The car will be able to move in the four directions on a two-dimensional display board with square boxes, its position will be memorized through the two coordinates. Each car will have a certain battery charge which will be consumed as follows: for each cell in which it moves it will consume 1% of the battery, if it moves at one time by at least 5 cells it will consume 1% less every 5 cells. Create the ambulance class, which will have the same characteristics as normal cars, but in addition it will have the siren, which can be operated. When the siren is activated the charge will drop by 2%
Dima
bruh
Mar!o
Dude we are not freelancers here
Mar!o
I'm available as freelancer on fiverr contact me there...
Mar!o
Mar!o
Anonymous
are you a hacker?
Dima
lmao
I_Interface
are you a hacker?
@Neko_cpp is from Anonymous.
Anonymous
😂
Anonymous
😢
Anonymous
Dima
I am from JPEG
Anonymous
I am from JPEG
Are yoy a image file😳
I_Interface
Dima
She*
Mar!o
are you a hacker?
Yes I´m typing random numbers into a green terminal then random green numbers are running over my screen and then I hacked the NASA
Mar!o
which language was that? with an end keyword? Lua has an end keyword but no semicolons?!