🐉
then let's say I have this cin method
istream & operator >> (istream& in, Bar& N)
{
in>>N.size;
N.max = (N.size)*2;
for (int i=0; i<N.size; i++)
in>>N.fooArray[i];
//calling the Foo class istream method
return in;
}
would there be problems?
🐉
because if it's already pointing to a nullptr, when will it point to a dynamic array with size and capacity??
klimi
Cool
klimi
Welcome
Artöm
🐉
maybe not even necessary to delete it since it doesn't point to anything
Artöm
You should
Artöm
It might, so delete it first
🐉
You should
It seems like "N.arrayStrum = new Strumento [max];" throws an error in the compiler
Artöm
🐉
expression in new-declarator must have integral or enumeration type
🐉
woops nvm I forgot to write N.max
destroyed
Bla bla
Maria33
I’m doing a program in C. I have created a graph in the format png. With Windows if you type ‘display image.png’ you can visualize the image, but if I’m using a Mac there’s a message that appears in the word ‘display’ that says ‘invalid command’.
Maria33
Does anyone know which word should I use instead of display when I’m using a Mac. Thanks!
Dima
Dima
Bash command
Dima
Execute as a bash command
Maria33
Diypa
Hi
Asdew
Just ask your question.
Diypa
Solved the problem on my own...
Loner〽💻
Hi...I have been trying to use graphics.h in codeblocks but it does not work...i I have tried following some procedures from google but nothing works...i just get ".xe has stopped working". What might be the problem??
Loner〽💻
Loner〽💻
Thats the sample code
Loner〽💻
Dima
jpeg
Loner〽💻
and that is what i get after runnimg the code..
Youssef
Can i compile c source code with c++ compiler?
Dima
yes
Ludovic 'Archivist'
Caio
Anonymous
hi
how can i jump from catch scope to try scope without nothing gets cleaned up in try codes ( from where it remains )
Srimathi
Sidharth Kumar
Ho
Sidharth Kumar
What's the most advanced topic of c++?
Sidharth Kumar
Anyone going to answer my question?
Asdew
I'd say that at least one of the hardest is the name. It's C++, not c++.
Ludovic 'Archivist'
Ludovic 'Archivist'
Nobody delves into it so it is the most advanced topic
MᏫᎻᎯᎷᎷᎬᎠ
Ludovic 'Archivist'
What is it?
https://en.cppreference.com/w/cpp/locale/locale
Thanveer
Where's that
Thanveer
Kk got it
Daniele
is there a way to read text from a specific line of a file?
Daniele
I have a file with 2 lines and I need to read the second one, how can I do this?
Anonymous
Use object method
Anonymous
Or use heroine function if you are trying to read a sentence
Anonymous
Can i compile c source code with c++ compiler?
It is recommended to write portable codes; however it is possible to write a valid C program which is not valid in C++:
struct operator {
const char *name;
};
int operator(const struct operator *, int, int);
int main(void)
{
for (int try = 0; try < 10; ++try)
operator(NULL, 0, try);
return 0;
}
Daniele
also, the number of elements in the file is unknown, so I cannot really use fscanf
Artöm
Artöm
Artöm
Artöm
Artöm
Do you need whats inside the lines?
Artöm
If not, read charwise or blockwise and count newlines
Anonymous
Does any 1 here have resources on how to get started in driver development for windows but in (modern) c++ instead of c?
Sidharth Kumar
Sidharth Kumar
Sidharth Kumar
Someone please give your helping hands
Mat
#howtoask
Mat
Mat
^
Sidharth Kumar
I am a school student btw. I got this problem in my cybertronics Olympiad .
Sidharth Kumar
I was unable to solve this problem
Anonymous
lol
Dima
lol noobs
I_Interface
Dima
I_Interface
klimi
Whew