[Solved] How can I fix this error in my code for an assignment?

I eventually figured this one out. Here’s the code I came up with: /*********************************************************************** * Program: * Assignment 31, Array Design * Sister Unsicker, CS124 * Author: * Lanie Molinar * Summary: * This program gets 10 grades from the user, averages them, and displays * the result. It doesn’t count -1 as a completed … Read more

[Solved] Compile error when using FFMPEG library

A lowercase -l is a linker option used to specify libraries. They might look like libsomething.a and becomes -lsomething in the linker invocation. In order to add a directory to the header search path, use a capital i, -I. gcc main.c -L/some/path/ffmpeg_build/lib -I/some/path/ffmpeg_build/include 1 solved Compile error when using FFMPEG library

[Solved] Evaluating equations during “new EXlement”

The locally scoped winTemp variable is hiding the instance variable (inside readXML() method). Thus winTemp instance variable does not get set at all and holds the default value, i.e. 0, by the time of addition. solved Evaluating equations during “new EXlement”

[Solved] Condition is not evaluated in loop

Initially you set: int menu_choice = 0; Then you ask: if (menu_choice < 1 || menu_choice > 4 ) The choice is smaller than 1 so the if block is entered. You then get some user input and exit the application. 3 solved Condition is not evaluated in loop

[Solved] Error in strcmp C++?

Template: int strcmp ( const char * str1, const char * str2 ); strcmp() compares the C string str1 to the C string str2. 1. return value<0 : the first character that does not match has a lower value in ptr1 than in ptr2. 2. return value=0 the contents of both strings are equal. 3. … Read more

[Solved] Declaring objects name using some loop [closed]

Objects don’t have names – variables have names. When you declare a variable and initialize it (Java): Person alice = new Person(“Alice”, 25); then alice is the name of a variable, not the name of an object. If you need to create objects in a loop and keep track of them, then use an array … Read more

[Solved] Stuck on an Implementation for string class [closed]

In order for this to work correctly you need to change s to the member variable pointing to the array of characters. You didn’t provide the class definition of String so it’s hard to say what the name of that member variable is. You should also change char String::element(int i) const to either char String::element(size_t … Read more

[Solved] C# calculate IPs between two addresses [closed]

behold, LINQ // don’t need to know which is start or end, assuming string compare works as expected. var addresses = new List<string>() { “192.168.10.10”, “192.168.10.20” }; // convert string to a 32 bit int Func<string, int> IpToInt = s => { return ( // declare a working object new List<List<int>>() { // chop the … Read more

[Solved] ERROR:Missing type specifier [closed]

In your setMake function it’s declared as a string but returns no value. I believe you forgot to return the passed value. //************ // setMake //************ string Car::setMake(string carMake) { make = carMake; return make; // This line should do the trick } I do suggest next time taking a closer look at what the … Read more

[Solved] Payroll program in C++

Initialize employeeCounter and it’ll work: int employeeCounter = 0; Frankly, this code simply is not presentable at all. You need to at least indent it consistently. There are a lot of things that you need to look at. You should go through the C++ Core Guidelines. https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md Edited — Updated Code Here’s your cleaned up … Read more