Answer the question
In order to leave comments, you need to log in
What's wrong with the flow?
I started to get acquainted with streams and at the first attempt to "feel" this I caught an error:
(Compiler GCC 8.2.0)
Imagine.cpp: In function 'void foo()':
Imagine.cpp:6:10: error: 'std::this_thread' has not been declared
std::this_thread::sleep_for(std::chrono::milliseconds(4000));
^~~~~~~~~~~
Imagine.cpp: In function 'int main()':
Imagine.cpp:11:10: error: 'thread' is not a member of 'std'
std::thread test(foo);
^~~~~~
Imagine.cpp:11:10: note: 'std::thread' is defined in header '<thread>'; did you forget to '#include <thread>'?
Imagine.cpp:3:1:
+#include <thread>
#include <chrono>
Imagine.cpp:11:10:
std::thread test(foo);
^~~~~~
Imagine.cpp:13:5: error: 'test' was not declared in this scope
test.join();
^~~~
Imagine.cpp:13:5: note: suggested alternative: 'tzset'
test.join();
^~~~
tzset
#include <iostream>
#include <thread>
#include <chrono>
void foo(){
std::cout<<"Thread"<<std::endl;
std::this_thread::sleep_for(std::chrono::milliseconds(4000));
std::cout<<"END"<<std::endl;
}
int main(){
std::thread test(foo);
test.join();
return 0;
}
Answer the question
In order to leave comments, you need to log in
In the form, send name="add-to-cart[]", instead of name="add-to-cart", also with quantity.
It turns out /configurator/?add-to-cart[]=17617&add-to-cart[]=13132&quantity[]=1&quantity[]=4
Then parse the get request on the server side and fix the form processing.
Everything is simple.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question