[Solved] Split an uneven number in even shares

[ad_1] Divide number by 6 and round to the nearest number. Your first 5 numbers were calculated in step 1. Last number = Initial number – (5 x number from step 1) 0 [ad_2] solved Split an uneven number in even shares

[Solved] how to store negative floating-point numbers in C

[ad_1] It seems you have your terminology mixed up. What you’re calling “signed” numbers are actually called fractional numbers. So what you’re really asking for is a datatype that hold values that are both fractional and negative. The double type can do just that. [ad_2] solved how to store negative floating-point numbers in C

[Solved] C++ : Why my string is not getting printed?

[ad_1] See CppReference operator [] No bounds checking is performed. If pos > size(), the behavior is undefined. When you define string r, its size() is zero, so all your character assignments are undefined behaviors. You may want to resize it first: r.resize(9); Or alternatively, append the characters one-by-one: r = “”; r.push_back(hh/10+’0′); r.push_back(hh%10+’0′); r.push_back(‘:’); … Read more

[Solved] C++ Code Blocks | I keep getting the same message when compiling ” …….was not declared in the scope. How do i declare something in the scope?

[ad_1] C++ Code Blocks | I keep getting the same message when compiling ” …….was not declared in the scope. How do i declare something in the scope? [ad_2] solved C++ Code Blocks | I keep getting the same message when compiling ” …….was not declared in the scope. How do i declare something in … Read more

[Solved] Undefine reference of

[ad_1] The problem is that c++ test.cpp -I./include-core/ -o bin/test -L./bin -l${core_NAME_ROOT}c++ test.cpp -I./include-core/ -o bin/test -L./bin -l${core_NAME_ROOT} will first process the library and then your .cpp file. When processing a library, referenced symbols are resolved (“linked”) and all unresolved symbols in the library that aren’t needed are thrown away. That means that as soon … Read more

[Solved] How to use strtok in string?

[ad_1] The cause of the problem: The function strtok() has many problems, due to the fact that subsequent calls depend on previous calls, and this dependency is managed in an unsafe manner: it’s not thread safe (see Robert’s comment, and C++ standard section 21.8 pt 14) if one function you call would use strtok() without … Read more

[Solved] How to make this c# code small or refactor this code [closed]

[ad_1] All your iterations can be joined together, therefore executed in one run like: ArrayList groupA = new ArrayList(); ArrayList groupB = new ArrayList(); ArrayList groupC = new ArrayList(); ArrayList groupD = new ArrayList(); ArrayList groupE = new ArrayList(); ArrayList groupF = new ArrayList(); ArrayList groupG = new ArrayList(); ArrayList groupH = new ArrayList(); for … Read more

[Solved] Why does this code hang on reaching the first ReadLine from a StreamReader?

[ad_1] I think you should return to basics: public static string SendXMLFile(string xmlFilepath, string uri, int timeout) { using (var client = new WebClient()) { client.Headers.Add(“Content-Type”, “application/xml”); byte[] response = client.UploadFile(uri, “POST”, xmlFilepath); return Encoding.ASCII.GetString(response); } } and see what works and what the server thinks of your file. When you really need a TimeOut … Read more

[Solved] Cannot access class from another class c#

[ad_1] Obviously your main window is a YourProgress but you could try to get a reference to the ChooseExercises window using the Application.Current.Windows collection: private void TabThursday_Loaded(object sender, RoutedEventArgs e) { ChooseExercises ce = Application.Current.Windows.OfType<ChooseExercises>().FirstOrDefault(); … } 2 [ad_2] solved Cannot access class from another class c#

[Solved] How to delete first text? (c#)

[ad_1] If you have dynamic separators like this, String.Split is not suitable. Use Regex.Split instead. You can give a pattern to Regex.Split and it will treat every substring that matches the pattern as a separator. In this case, you need a pattern like this: \d+\. |1|2|3|4 | are or operators. \d matches any digit character. … Read more