[Solved] fopen() crashing on second use in c [closed]

[ad_1] You create a pointer named buf that points to space containing a single character ‘\0’. Then you use fgets() to try to read an unknown number of characters (you don’t show what maxvalue is) into the space pointed to by buf. But that space is only one character long. Reading into it will overrun … Read more

[Solved] How to correct segmentation fault with char * to int conversion

[ad_1] You are confusing pointers with arrays. A pointer just points; declaring a pointer does not reserve memory, it just creates a pointer variable pointing to some undefined place. Corrected program: char *recepcao(char *receber) { scanf(“%s”, receber); return receber; } int conversao(char *string) { int i, j; for(i=0; string[i]!=’\0′; ++i) { continue; } int var[100]; … Read more

[Solved] Task is getting the wrong value

[ad_1] I fixed it by changing api to var response = await client.GetProtectedAsync<ProductsCollectionPagingResponse>($”{_baseUrl}/api/plans/query={query}/page={page}”); from var response = await client.GetProtectedAsync<ProductsCollectionPagingResponse>($”{_baseUrl}/api/plans?query={query}&page={page}”); 1 [ad_2] solved Task is getting the wrong value

[Solved] How to solve segmentation error in C program [closed]

[ad_1] Variable base is undeclared. Variable idade is undeclared. It should be printf(“%d”,base) if your are using base. #include <stdio.h> int main(){ int age; int aget; int total; printf(“Input your age: “); scanf(“%i”, &age); printf(“Input your age two: “); scanf(“%i”, &aget); total = age + aget; printf(“%d”,total); return 0; } 1 [ad_2] solved How to … Read more

[Solved] What does the : Operator mean in C++ inheritance?

[ad_1] The single colon could also signify class inheritance, if the class declaration is followed by : and a class name, it means the class derives from the class behind the single colon. class InheritedClass : public BaseClass. [ad_2] solved What does the : Operator mean in C++ inheritance?

[Solved] FileUpload Error? [duplicate]

[ad_1] You cannot find a control in the GridView directly when its in the row, you have to find it in the row of the gridview. Use either: GridView1_RowDataBound event if(e.Row.RowType == DataControlRowType.DataRow) { FileUpload fileupload = (FileUpload)e.Row.FindControl(“fileupload1”); } OR DataRow r = (DataRow)sender; FileUpload fileupload = (FileUpload)r.FindControl(“fileupload1”); [ad_2] solved FileUpload Error? [duplicate]

[Solved] How can I access an array in C

[ad_1] You have a few errors, can you try this: void load(char *name, float *share, float *buyprice, float *currprice) { printf(“Enter stock name”); gets(name); printf(“Enter share, buyprice, currprice”); scanf(“%f %f %f”, share, buyprice, currprice); // changes: removed &* } void calc(float share, float buyprice, float currprice, float *buytotal, float *currtotal, float *profit) { *buytotal = … Read more

[Solved] How to write Parameterised Query in .NET Framework 1.1

[ad_1] I have solved the problem : I changed the code as : cmd.Parameters.Add(“@EmployeeID”,EmployeeID); cmd.Parameters.Add(“@ReasonOfChange”,ReasonOfChange); And also cmd = new SqlCommand(strQuery,Connection); Previously Connection is missing. Thanks for your valuable inputs. 1 [ad_2] solved How to write Parameterised Query in .NET Framework 1.1

[Solved] Compare two character strings in C [closed]

[ad_1] Ok, just to put an end to this. Let’s think what string comparing is. First, let’s disregard NULL pointers, and assume that both strings are actually valid strings. Then we need no special check. We will do this by simply comparing them element for element. Whenever we compare two elements at the same index, … Read more