- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 4
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
14 Posted Topics
Re: Hello Nether_1, not sure if you are still having an issue getting your shaders to run but I have found a solution. In display.cpp the openGL version was not being set. So the following lines have been added in the Display constructor. SDL_Init(SDL_INIT_EVERYTHING); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3); Here is the … | |
Re: Here is one way of doing it: #include <iostream> #include <fstream> #include <string> #include <vector> using namespace std; int main() { ifstream file; vector<string> theNames; string name,replaceName; file.open("studentName.txt",ios::in); //check to see if the file loaded if(!file.is_open()) { cout <<"Cant find file\n"; return 1; } while(!file.eof()) { file >> name; //save … | |
Re: Your problem is that you are only creating one Payroll employee item. line 51 Then from lines 55 -> 58 you are just looping over the single item that you have created therefore getting the same output for all employees. An easy way to do this without passing an array … | |
Re: #include <stdio.h> #include <iostream.h> #include <vector.h> using std::cout; using std::cin; //2 dimensional vector struct struct points { float x, y; }; main() { int i; float r; std::vector<points*> pointvect; // vector declaration points * point; //declare pointer cout << "Set dimension of vector"; cin >> i; //with struct only 2D … | |
Re: for the average you would just divide count by the array size, so in this case it would be insert after line 59 int average = count/100; cout << average; //prints the average of the array | |
Re: What you could do is place all of the quatersales structs into a vector object like so: vector<quaterSalesStruct> qSales; Then you create the variables : int highest = 0; int lowest = 0; Then to find the highest and lowest you can do the following: for (int x = 0; … | |
Re: You should move the initialization of your NumClass to line 53 because it is being initialized with a default size of 10, so then what ever size the user enters isnt being created and can cause the array to go out of bounds. This line "myArray.theArray[size];", is just trying to … | |
Re: You have QPushButton * bimout defined as a member in your class definition so why are you doing it again at line 47 ? Line 47 should be bimout = new QPushButton("BMIInterpretation", this) The same goes for a couple of your other class members(the pushbuttons and radio buttons) My advice … | |
Re: Why not get rid of the year and month table entries and make a new one called date and its data type will be Date/Time. Then when you could use a query like this : Select * from table where date between 'YYYY-MM-DD' and 'YYYY-MM-DD' Hope this helps | |
Re: What types of ports are you looking at finding ? Serial ? | |
Re: Dim name As String = "Don Paul" Dim position As Integer = name.IndexOf("P") ' get the position of the first letter in the surname Dim reversed As String = name.Substring(position) + ", " + name.Substring(0, 1) 'join the surname with the first letter of the name Hope this helps | |
Re: Public Function ClassAverage() Dim the_class_average As Decimal = 0 Dim Grades() As Decimal = {76.5D, 63.4D, 45.4D, 94.5D, 81.3D, 66.2D, 68.6D} Dim sum As Decimal = 0 For intCounter As Integer = 0 To Grades.Length - 1 sum += Grades(intCounter) Next the_class_average = (sum / Grades.Length) Return the_class_average End Function … | |
Good afternoon everyone. I made a project using Florian Leitner-Fischer's usb library. I can send data to the bus 100%, but when i read i get the recieve frame and then my application hangs for some reason. When i uncomment out "MsgBox(content)" in the event catcher, the program no longer … | |
Hello everyone. Im trying to write a program for a cellphone that gets inputs from the user, does some calculations then displays various outputs. I am very new to java programming and getting a little confused. I am having trouble with finding out how to read the values from the … |
The End.