[Solved] Realloc to structure in c

[ad_1] You access out of bound for firma. data = (Order*)malloc(ordersize * sizeof(Order));//we allocte memory for the struct Order with pointer data add_orders(data, &ordersize); //send it As you allocated memory of size orderSize and you access firma[newstart]. newstart = *ordersize; //we just did it (*ordersize)++; // now we have new size +1 for the one … Read more

[Solved] How I Can send a file with Ajax?

[ad_1] You need to create a form data object. In the ajax function, set processData to `false. Because data passed in to the data option as an object (technically, anything other than a string) will be processed and transformed into a query string, fitting to the default content-type “application/x-www-form-urlencoded”. If you want to send a … Read more

[Solved] Joining 2 fields into another table

[ad_1] $query = “SELECT a.*,b.mobilenumber,b.firstname,b.lastname FROM user_address a left join user b on a.user_id=b.user_id WHERE a.user_id IN (SELECT id FROM user WHERE email=””.$email.””)”; 1 [ad_2] solved Joining 2 fields into another table

[Solved] No More Confusing Pointers

[ad_1] Point 1: Nested functions are not standard C. They are supported as GCC extension.. Point 2: printf(“&b is:%s\n”,&b); is wrong and invokes UB, because of improper format specifier. You need to change that to printf(“&b is:%p\n”,(void *)&b); Point 3: &(&a) is wrong. the operand for & needs to be an lvalue, not another address, … Read more

[Solved] how i can concatenate two variable it type Text Field?

[ad_1] I couldn’t get what you want. Is this what you want to achieve? answerScreen.text = valueOne.text! + valueTwo.text! String values can be added together (or concatenated) with the addition operator (+) to create a new String value: Check here for more details 4 [ad_2] solved how i can concatenate two variable it type Text … Read more

[Solved] Need help regarding very basic issue about .Net program execution flow and basic oops related [closed]

[ad_1] when we run application from IDE then how compiler come into scene to compile our program The IDE starts the compiler and passes it your program. The compiler is another program. It doesn’t need special invocation. You can do it yourself without an IDE by just calling csc.exe directly. and after then how program … Read more

[Solved] PHP & JAVASCRIPT – How to take values from multiple input fields after clicking on the buttons which are connected to each input field? [closed]

[ad_1] You could do something through jQuery: $(‘.edit_profile’).on(‘click’, function(){ // if still disabled, return; if ($(this).prev().is(‘:disabled’)) return; // otherwise we go for value: var value = $(this).prev().val(); console.log(value); }); And please take a look for function: prev() https://api.jquery.com/prev/ For passing your fields to php use ajax: $.ajax({ type: “POST”, url: “myphpscriptforupdate.php”, dataType: ‘html’, data: { … Read more

[Solved] Code not working? [closed]

[ad_1] To start with, get rid of yes and no, which make no sense, and read the input into a string variable: string Rated; cin >> Rated; then to use that, remember to use == not = for comparison: if (Rated == “yes”) {/*whatever*/} Alternatively, use a boolean variable: string yes_or_no; cin >> yes_or_no; bool … Read more