c++ tag

886 questions


1 answers
41 views
0
What is the difference between string and char[] in c++?

string strTest = Hello; has a size of 5 charTest[] = {'H', 'e', 'l', 'l', 'o'}; has a size of 5.What is the difference between string and char[]?

2 years ago

1 answers
21 views
0
How can I send the value calculated by the c++ program to ATmega128A via RS232 serial communication?

We are creating a program that sends the result value calculated using language c to ATmega128A to make ATmega128A work. The only answer is to use MFC?

c++
2 years ago

1 answers
73 views
0
'for' loop initial declarations are only allowed in C99 or C11 mode

//#include <stdio.h>long fib(long num);int main(void){ int seriesSize; scanf (%d, &seriesSize); if (seriesSize <2) seriesSize =2; printf(First %d Fibonacci numbers: \n, seriesSize); for...

2 years ago

2 answers
50 views
0
[C] [C] Error expected ';' before 'printf'

#include<stdio.h>int main(){ int A; int B; scanf(%d%d,&A,&B); if (A>B) printf(>); else if(A=B) printf(==); else (A<B) printf(<);}I don't know why it doesn't work.136D:\Sys...

c c++
2 years ago

1 answers
28 views
0
I'm studying language c, but it's not working well. The score is an A to F grade, and it's an inequality question.

#include<stdio.h>int main(){ int score; scanf(%d,&score); if(100>=score>89) printf(A); else if(89>=score>=80) printf(B); else if(79>=score>=70) printf(C); else if(69>...

c c++
2 years ago

1 answers
113 views
0
In programming, about referring to yourself in the definition part.

Hello.I understand that many of the programming languages can refer to themselves while defining a function or class.Recursive Function.# Python3sum = 0;def factorial(a, n) if (n==1): return 1 else: ...


1 answers
21 views
0
In c++, the merge() and set_union() functions keep failing...

Vector v1 with 5 elements and vector v2 with 3 elements are

c++
2 years ago

1 answers
122 views
0
winapi (win32) Space Invader Game (How do I shoot a bullet)

I've been thinking about it for about 8 hours, but I can't solve it, so I'm posting a question.Like the title, I'm making a space invader game in winapi (win32). If you press the space bar, a bullet w...

2 years ago

1 answers
20 views
0
An access violation occurred while recording the location. That's the error

#include <stdio.h>int main(void){ char name[10]; printf (Enter Your Name:); scanf_s(%s, name); printf (Your name is %s; name); return 0;}Why is that?

c++
2 years ago

1 answers
80 views
0
Please help me with the c++ data structure (coding...

I saw the code in the C++ book and followed it. But I want to add and remove objects in this code. What should I do?I'm really a beginner.ㅠ

2 years ago
« - 79 - »

© 2024 OneMinuteCode. All rights reserved.