robherc
Igor🇺🇦
robherc
Qt is C++ library
oops, srry....C programmer here 😉
...still think it's a bit OT, but hey.
🕸 03xploit 🕸
Anonymous
What do u guys think about using devc++
Tigran
hi guys , i am doing cs106b courses at stanford(2008) and couldn't connect external libraries to the project , i tried to connect them by absolute path but ide shows a bunch of errors , i googled and didn't find any solution , the problem seems to have obvious solution but as i am beginner i couldn't find it . the code #include "/Users/tigran/Desktop/cs106lib-0.3.1/headers/genlib.h"
#include "/Users/tigran/Desktop/cs106lib-0.3.1/headers/simpio.h"
#include <iostream>
int main(int argc, const char * argv[]) {
// insert code here...
std::cout << "Hello, World!\n";
return 0;
} , errors: (Main cannot be declared as global variable) , (Too many arguments provided to function-like macro invocation)
Tigran
i am on mac os , but i found the soultion , thank you
Joo
What are the uses of C++ in the world
NG
I need C++ tutorial for beginner
Anonymous
Joo
HaiNahi
I am making project in sdl using cxxdroid and I am getting yellow triangles in the screen over the render. help to find the bug.
HaiNahi
I think it can be due to bad android compiler also
HaiNahi
https://github.com/SwastikMajumder/cpurenderer 29th file
Saitama
write a c program to reverse the integers(collection of digits) present in a line of text
Ex: input string 12345vector67xyz
After proccessing : 54321vector76xyz
Saitama
Hanz
That is an interesting exam question
HaiNahi
Pavel
Can anyone please tell me how to write this program?
You can make a loop that goes through all the symbols, then you need to remember position each time you find a digit character that follows a non-digit (startPos), and then when you find a digit character that followed by non-digit you can start anothet loop from that remembered startPos to the current pos (half that path actually) where you will swap digits
Saitama
HaiNahi
pastebin.com/Nn4TE9kN
HaiNahi
I am really a slow coder
Saitama
Alvin
Hello Rose...
I have read and understood the rules clearly.
Anonymous
Guys, how can i build in c++ The GUI?without pre existing libraries like qt or wxwidget.. I don't know what to search.. I ve build a stupid class and want to compile a GUI for it so that i can understand how to program it
Anonymous
Any advice?
HaiNahi
HaiNahi
SDL is light weight you can use that too
Anonymous
I use mac but besides that ive could use my w10 PC but ive read its pretty old.. Whats sdl stands for
Anonymous
Simple directmedia layer ok. I read some in it
Anonymous
On*
John Chrizel Corre
Hi can you help me h my homework?
QUESTION: Using arrays. You are given N coins in a line. The value of a coin can be either 1, 2, 5, 10, 25 or 50 . Make a program that gets the number of the coins (N), a selection factor (K), and the values of coins. Your program must calculate the sum of the coins in the positions i*K where i starts with 0 and increases by
حماد
Ludovic 'Archivist'
F R E D
Ludovic 'Archivist'
😂😂😂
Like I often say to my apprentice, you cannot fix the design of software that doesn't exist yet, you need a prototype for that
Ludovic 'Archivist'
Anonymous
Yo
Anonymous
Anonymous
What’s up
Joo
Hanz
Hadi A
Hello can anyone recommend a good book to learn c programming for beginners
robherc
robherc
Hanz
One day everything will be worth for free
Anonymous
Can any one please provide the C++ book for me , here Iam a beginner in C++ , but have learned C.
Igor🇺🇦
Md_Imran_Ansari Bada Business
Hi
AHMED
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
vector<double> heights = {100.3, 120.8, 132.7, 160.4, 150.3, 144.9, 170.5, 125.6};
auto myLambda = count_if(heights.begin(), heights.end(), [](int x) { return x > 125.00; });
cout << "The number of participants will be: " << myLambda;
return 0;
}
AHMED
The output:
AHMED
The number of participants will be: 5
[Program finished]
AHMED
Why the output is not 6?
Igor🇺🇦
Md_Imran_Ansari Bada Business
Hi
Md_Imran_Ansari Bada Business
How are you
AHMED
AHMED
#include <iostream>
#include <string>
using namespace std;
enum class myenum
{
fares,
ahmed,
yaser
};
int main()
{
string name;
cout << "Enter your name:\n";
cin>>name;
myenum myobj = myenum::ahmed;
if(myobj == myenum::ahmed || myobj == myenum::fares || myobj == myenum::yaser){
cout<<"You are allowed.\n";
}
else{
cout<<"You are not allowed.\n";
}
return 0;
}
AHMED
In the above code:
How to check if a user input is present in a scoped enumerator?
Gaurav
Write a program to search an
element in an array using linear
search where the numbers are
member of a class named
linear_Search and the searching
is done using a member
function search(). (Using c++)
Gaurav
Can anyone help me
Henry
Hi what youtube can i subscribe to have more insight in C
Mariia
Hi guys. What does it mean: puts(""); ?
Just like a \n ???
Igor🇺🇦
Igor🇺🇦
Mariia
Martin
Hi, I can't figure out why my coroutine is leaking memory (ASan and valgrind both complains). Why..?
class A {
public:
A() { std::cerr << "A ctor\n"; }
~A() { std::cerr << "A dtor\n"; }
};
int main()
{
auto getACoro = []() -> cppcoro::task<std::shared_ptr<A>> {
co_return std::make_shared<A>();
};
auto foo = [getACoro]() -> cppcoro::task<> {
co_await getACoro();
co_return;
};
auto coro = [&foo]() -> cppcoro::task<> {
co_await foo();
};
cppcoro::sync_wait(coro());
}
Pavel
Anonymous
Anonymous
Use have non-void return type and no (co_) return statement
Martin
You didn't answer the question
In that case. This is actually 3 or 4 layers of async coroutine calls to the network and response parser. But somehow coroutine frames aren't released when the the coroutine ends.
Martin