[Solved] Sharing one MenuStrip between multiple Forms and “open, save, save as” each form separately

[ad_1] Ok no problem I’ve a Main form and call multiple panel (PanelSlider) with 1 MenuStrip with UserControl : public Form1() { InitializeComponent(); PanelSlider.Controls.Add(new Home()); PanelSlider.Controls.Add(new Tools()); etc… } Active Panel with button private void HomeBtn_Click(object sender, EventArgs e) { PanelSlider.Controls.Find(“Home”, false)[0].BringToFront(); } So to switch the multiple panel I declared a menustrip and for … Read more

[Solved] “argument of type ”int(*)()“ is incompatible with parameter of type int” error?

[ad_1] int bla(int, int, int, int); bla function expects int arguments but double n = bla(sum, budget, bet, new_budget); you are passing sum as a parameter which is a function. As your sum function returns an int, you can pass it as sum() double n = bla(sum(), budget, bet, new_budget); Side Note: Inside sum function … Read more

[Solved] How does one get text from inside of parenthesis in c++?

[ad_1] Here is a simple way to do what you are trying to do. (Based on what I can gather from your question) #include <string> #include <algorithm> #include <iostream> int main(int argc, const char * argv[]) { std::string str = “(\”Today is a good day to die.\”)”; std::cout<<str<<std::endl; str.erase(std::remove_if(str.begin(), str.end(), [](char x){ return (x == … Read more

[Solved] How to replace std::is_same_v with std::is_same

[ad_1] The error got resolved by @Someprogrammerdude comment about a is_same_v helper variable template defined here. My final code is #ifdef My_OLD_TOOL_CHAIN template< class T, class U > inline constexpr bool is_same_v = std::is_same<T, U>::value; template<class T, class O = T> using IteratorOnly = std::enable_if_t< !is_same_v<typename std::iterator_traits<T>::value_type, void>, O >; #else // My_OLD_TOOL_CHAIN template<class T, … Read more

[Solved] Iterate through array in c manually [closed]

[ad_1] I’m not sure what you want, nor what your actual problem is, but this works fine here: #include <stdio.h> #include <conio.h> int main() { char name[10][10]; int i; for (i = 0; i<10; i++) { printf(“Enter a name : “); scanf(“%s”, name[i]); } for (i = 0; i<10; i++) { printf(” Name %d: %s”, … Read more

[Solved] Rename in bulk C# [closed]

[ad_1] I manged to find a way. But for those who need help: foreach (var srcPath in Directory.GetFiles(tmppath)) { //To customize for yourself: //replace “tmppath” with what ever you want File.Move(srcPath, srcPath+”.jpg”); } [ad_2] solved Rename in bulk C# [closed]

[Solved] C I need to use malloc and a dynamically allocated array however I need to print the user input

[ad_1] issue 1: you are allocating sizeof(double) to store int issue 2: You are not traversing array to print numbers int main(void) { int user_input = 0, elements = 0; printf(“How many int elements will you enter?\n”); scanf(“%d”, &elements); int* dynamic_array = (int *)malloc(sizeof(int)* elements); if(dynamic_array == NULL) { perror(” Out of memory “); return … Read more

[Solved] Unhandled exception at 0x6b20d0ac in Ammar_1610852_Assignment.exe: 0xC0000005: Access violation reading location 0x00003232

[ad_1] Your problem is that you use the wrong format specifier for both scanf and fprintf. One example: printf (“Enter Fine Amount\n”); scanf (“%s”,&fa); The variable fa is an integer but you try to scan using %s. The same goes for fprintf where you try to print an integer using %s. Use %s for strings. … Read more

[Solved] How to make transparent WUA app just like new windows 10 calculator is on hold? [closed]

[ad_1] The transparency effect is called “Acrylic” and is part of Microsoft’s new design language. When and how to use it is explained on MSDN. In a nutshell, you simply need to apply an AcrylicBrush on whatever surface you want to make transparent. The BackgroundSource allows you to tell whether you want the transparency to … Read more

[Solved] ‘int’ does not contain a definition and no extension method

[ad_1] You are passing empID as an int type parameter and later you are using it as a type in your parameters. For example. cmd.Parameters.AddWithValue(“@LeaveType”, empID.LeaveType); I believe you have to pass your object probably of EmployeeLeave type in your method GetLeaveRecord(int empID) Or you may get your object based on the ID in your … Read more

[Solved] What does “const int&” do as a return type?

[ad_1] In general, returning a reference avoids that the return value gets copied, and (if it is not const-qualified) gives you the opportunity to change the “original” value. A return type const T& is often used in conjunction with objects of class type, e.g. std::vector, where copying could result in (unwanted) overhead. In conjunction with … Read more

[Solved] want to create diamond shape using while in C

[ad_1] It would help to see your code for your implementation of the while loop to see what’s wrong, but the general solution for converting a for loop to a while loop is this: for(i=1;i<=2;i++) { /*your code*/ } becomes i = 1; while(i<=2) { /*your code*/ i++; } Make sure your iterators and decrementors … Read more

[Solved] using namespace std; in header file

[ad_1] Seeing as this is a course header, I think students are supposed to include it and then use most of the standard library that way. I am surprised Stroustrup teaches it that way (it is, in my opinion, still bad practice), but it does mean that he has one less bit of syntax to … Read more