Anonymous
Plz ans
Suka
What is meant by null pointer ? Why to initialise uninitialised pointer to null?
https://www.tutorialspoint.com/cplusplus/cpp_null_pointers.htm if all unused pointers are given the null value and you avoid the use of a null pointer, you can avoid the accidental misuse of an uninitialized pointer.
Álvaro
Hi, can somebody help me out compiling Ncat statically?
Álvaro
I'm dealing with the following tutorial: https://secwiki.org/w/Nmap/Ncat_Portable but lots of errors are thrown from nsock
Álvaro
The majority of them are C4430, C2143 and C2238 (I have the IDE on other language so I cannot copy exact messages)
バレンタインがいない柴(食用不可)
🐈 meow programmers
Nameful
🐈 meow programmers
dogs don't go meow
バレンタインがいない柴(食用不可)
dogs don't go meow
There’re times when I feel like I wish to learn another language
バレンタインがいない柴(食用不可)
(Like c++ 🤪)
Anonymous
How the array is considered as pointer and pointer can be treated as array?
バレンタインがいない柴(食用不可)
How the array is considered as pointer and pointer can be treated as array?
Try using them interchangeably and you’ll know a[1] == a+1;
バレンタインがいない柴(食用不可)
/a/ is a pointer pointing to the first entry of the array
Anonymous
What is meant by null pointer ? Why to initialise uninitialised pointer to null?
some function you send the pointer to (accidentally, without assigning something else to it) might check if the pointer is null and make your life easier by returning a simple error.
Anonymous
How the array is considered as pointer and pointer can be treated as array?
array names decay into pointers to the first element when used in an expression
バレンタインがいない柴(食用不可)
What is meant by null pointer ? Why to initialise uninitialised pointer to null?
if you don’t initialise it then you can accidentally have it to point to somewhere unimaginable ...
Anonymous
Ok
Shruti
C and C++ Beginner to Advanced class will be started from next week. Whoever interested, please DM
Silvester
Hi
Daniel
hi, are there c++ frameworks for image convertion, in mycase SVG to PNG or JPG
Anonymous
dont ignore please
Litteraly the first thing written in the pinned message is "You are not entitled for an answer" 🥲
Anonymous
yeah, but I havent gotten angry
Not yet, but I can make you if you want 🥲
Daniel
it is your right, you can do it))
Anonymous
Btw there is "Cool Image", I used it few times but I'm not sure it is designed for image conversion, give it a try if you want
Daniel
are there obvious solutions? Or you didnt encounter?
olli
hi, are there c++ frameworks for image convertion, in mycase SVG to PNG or JPG
librsvg and ImageMagick should both be able to do it.
Jerryjay
Write a C++ program that can be used to capture the details of students including admission and examination records. During admission,the id(string), name(first and lastname), gender, age, tel, level and program of the student are recorded. The recorded details are kept in a file called studrec.txt in a folder called records. At the end of every semester, the student's exam records for each course are recorded in a file called studexam.txt, in the records folder. The files contain records which are comma separated. The exam details include studentid, courseid, semid, midsem and exam mark. A course has id (integer), code(string), title and credit hours. A semester has id, description, academicyear. The user should be able to generate a semester's transcript for a student when the student's id, and semster id are provided. A transcript should have details as follows: StudentID: xxxxx Name: xxxxx xxxxxx Semester: xxxxxx Academic Year: xxxxxxx Course Code Title Mark Credit Grade XXXXX XXXXX XXXXXXX XX.XX X X XXXXX XXXXX XXXXXXX XX.XX X X XXXXX XXXXX XXXXXXX XX.XX X X ..... XXXXX XXXXX XXXXXXX XX.XX X X Total XXX.XX XX SWA: XX.XX Mark is the sum of midsem and exam mark SWA = sum of the product of each mark and credit hour for the course divided by the total credit hourse. The grading system is as follows: Mark -> Grade 80 - 100 -> A 70 - 79 -> B 60 - 69 -> C 50 - 59 -> D Below 50 -> F NB: Create structures for Course and Semester. Create a class for student with method that can read data from file, save student info to file and generate the transcript for students.
Jerryjay
Write a C++ program that can be used to capture the details of students including admission and examination records. During admission,the id(string), name(first and lastname), gender, age, tel, level and program of the student are recorded. The recorded details are kept in a file called studrec.txt in a folder called records. At the end of every semester, the student's exam records for each course are recorded in a file called studexam.txt, in the records folder. The files contain records which are comma separated. The exam details include studentid, courseid, semid, midsem and exam mark. A course has id (integer), code(string), title and credit hours. A semester has id, description, academicyear. The user should be able to generate a semester's transcript for a student when the student's id, and semster id are provided. A transcript should have details as follows: StudentID: xxxxx Name: xxxxx xxxxxx Semester: xxxxxx Academic Year: xxxxxxx Course Code Title Mark Credit Grade XXXXX XXXXX XXXXXXX XX.XX X X XXXXX XXXXX XXXXXXX XX.XX X X XXXXX XXXXX XXXXXXX XX.XX X X ..... XXXXX XXXXX XXXXXXX XX.XX X X Total XXX.XX XX SWA: XX.XX Mark is the sum of midsem and exam mark SWA = sum of the product of each mark and credit hour for the course divided by the total credit hourse. The grading system is as follows: Mark -> Grade 80 - 100 -> A 70 - 79 -> B 60 - 69 -> C 50 - 59 -> D Below 50 -> F NB: Create structures for Course and Semester. Create a class for student with method that can read data from file, save student info to file and generate the transcript for students.
can anyone help me?
olli
can anyone help me?
If you want help. What have you done so far? Where is your code? Where did you get stuck?
coolthought
break it down into individual steps and write them in functions. eg. one function to read the data, one function to print in the format, one function to score the grade, etc.
Anonymous
What is mean by generic pointer
Gunjan
Can anyone help me out with best c++ programming book for starter
Anonymous
Thanks
Right now my professor started to use int main(void) and not using void main() any more. So I asked what is the difference between int main() and int main(void) and he mentioned that both are same where () means (void).😅😅
klimi
Not true
klimi
(Void) means that the function does not take any arguments () means that the function takes various arguments
klimi
At least in C
Anonymous
He said, it is better to mention (void) instead of placing empty bracket 😅
Anonymous
Depends what you want to say
I mean that's what he said...
Diego
Why is it that way, though? I don't see how empty argument list can lead to various arguments? How do you even address them?
Anonymous
(Void) means that the function does not take any arguments () means that the function takes various arguments
Oh then as per your suggestions, it is always better to go for () as the function takes various arguments
Anonymous
He is using return 1 and even using void made me confuse
klimi
Why is it that way, though? I don't see how empty argument list can lead to various arguments? How do you even address them?
You can address them via library or by looking at the call stack, since there can be different arguments, they will be passed to the function
MRT
hi , i working with tcp , in local host my application work perfectly but in real host i can't connect to server, i must use vpn
klimi
Oh then as per your suggestions, it is always better to go for () as the function takes various arguments
No.... Not always... Imagine you create function with function(), then of you pass it argument you would expect different result right? But it won't give you compiler error
Diego
I can see how that would be useful though but it sounds really hacky to implement, coming from a C# background
klimi
oh boy and I thought C++ had a bunch of weird behaviours
Its not weird behavior at all, its perfectly logical and perfectly connected to assembly
Diego
If I understand correctly main(void) would throw a compiler error if you try to pass an argument Which is a good thing, if you don't plan on using any argument, you wanna make that obvious. It's usually a good idea to make everything your code does and ways to use it as obvious as possible, minimizes possibilities of using it wrong
Diego
Its not weird behavior at all, its perfectly logical and perfectly connected to assembly
When you put it like that it suddenly makes a lot more sense
klimi
Conclusion: main(void) is useless ? when there is option to use main() ?
main() to catch the arguments and env variables and stuff (but you should use (int argc, ... ...)
Anonymous
in a function definition f(void) and f() are equivalent
Anonymous
in a declaration f() means arbitrary arguments are accepted
Anonymous
So why void is created then?
Mahdi
Right now my professor started to use int main(void) and not using void main() any more. So I asked what is the difference between int main() and int main(void) and he mentioned that both are same where () means (void).😅😅
Oh no another confusion 😅. We were seeking the answer for int main() and void main() but now you say he used another weird format of main(void) rather than main() 😢.
Anonymous
I dont think they are
:/ but they are
Anonymous
I mean what is the use of void when they making code more complicated.
klimi
:/ but they are
f(void) doesn't allow you to pass any argument
klimi
?
Anonymous
f(void) doesn't allow you to pass any argument
neither does f(), if written in a function definition
klimi
Its russian
Mahdi
I mean what is the use of void when they making code more complicated.
I think it is better to not use (void) when it is supposed to not accept parameter
klimi
neither does f(), if written in a function definition
Huh.... I have been told that its the other way around... I guess I will have to do some testing on my own
klimi
This is English group... See the problem?
Anonymous
I think it is better to not use (void) when it is supposed to not accept parameter
So void became officially useless thing right now in C ?