I have a logined user and my running program as system process (not user process).
I want to get user name and surname from AD.
1. GetUserName() dont useful becouse it gets name for current process owner(for SYSTEM in my case).
2. There are userLogin, userName, userSurname and userDisplayedName in user properties of AD. Its possible to get userDisplayedName by NetUserGetInfo(), but I want to know is it possible to get userName and userSurname?
I'm working on a program for payroll that will calculate and display a list of payroll variables (including net pay) then run again sorting the net pay. So the program should run once display all the variables with the net pay not sorted then run a second time with the net pay sorted.
I've written a program. It is working. But it only runs once and it and it only displays the results with the net pay after it's sorted. What I need to do in order to get it to run a first time without sorting the net pays before it runs the second time sorting the net pays.
I'm trying to take a users input and break it up into four separate numbers, then take those numbers and arrange them from smallest to largest.So far I can't seem to get them working right.
Code:
# include <stdio.h>main () { int inputVariables[4]; //where userinput goes after being broken up int arrangedValues [4];// the user values arranged lowest to highest int i; int j; }
So my ongoing work sorting my net pay program continues.I've got it working to the point where it sorts the net pay and only the net pay. I've been told I can comment out the other variables (hours worked, hourly rate, etc...) with the exception of First Name, and Last Name which I need to sort along with Net Pay.I need to sort First Name and Last Name along with Net Pay so that while Net Pay is being sorted it still corresponds to the same individual.
Right now as I'm only sorting Net Pay and individuals end up with different Net Pays as the sorting occurs. This is the programs current output (Pre Sorting)
John Doe 900.00 Jane Smith 720.00 Chris Davis 450.00 Sara White 832.00 Alice Baker 756.00 Laura Jackson 486.00 Jack Benson 405.00 Kate Russle 1400.00 Matt Jones 880.00 Fred Shultz 1150.00
I am trying sort my Calorie array and day array corresponding to each other but how to start i cant grasp the concept for some reason. I want it to sort by calories in descending order.
So instead of this...
Day: Calories:
1 200 2 500 3 400 4 600 5 100
I want this.....
5 100 1 200 3 400 2 500 4 600
#include <cstdlib> #include <iostream> using namespace std; //Prototypes int getDays(int); void getCal(int*,int); float calcSum(float,int*,int);
I have a map which contains a multiset and another map
std::map<std::multiset<int>, std::map<int, int> >
And I need to sort the whole map according to the mapped value of the inside map, then output the data from the keys i.e. from the multiset and the first value of the inside map. I have tried to create a vector of pairs
and populate the first element with the map and where the second integer of the pair will be the mapped value to sort. I have tried iterating over the map to populate the vector but I'm not sure how to do so.
at the moment I lack access to the pc with the code on it, so for now I will try to keep my question basic.
now here is my problem: I have a listview witch is populated by user input(lets say for the ease of argument that the input is "first-name" "last-name" and "e-mail adres") all of with get there information from textboxes. then all the information gets stored in a list and on closing that list is stored in a xml-file in the following format
<Root> <Data> <first-name> Samual
[Code].....
the input, saving and loading is no problem. when you open the file this listview is in view = List so that you only see the last-name(I prefer it that way since I know how to code that) and when you click it it fills the textboxes with the corresponding information.
what I am trying to figure out it how to make it that it sorts itself(preferred sorting when something is changed). I tried the ListView.sorting = SortOrder.Ascending; when I do it that way it messes up the corresponding information(is it clear what I mean or do I need to add an example).
Basically what i am trying to do is that sort the names of 10,000 movies and then write those names to a text file. It gives an error in the nested loop by underlining arr and tells that no suitable conversion function from std::string to const char* exists.
I am accepting the word from user and arranging it in ascending order like in dictionary in a file . I am doing this by comparing the user entered word from existing word in the file . All the word which is smaller then user entered word is copied to another file "temp.txt" , then the user word is printed and then the remaining word ( which are larger) from "abc.txt" to "temp.txt" . But program close as soon as i enter the second word
Selection sorting a 2D array . Let's say i have an array like
1 2 3 4 //4 elements 1 2 // 2 elements 1 2 3 4 5 //5 elements 1 2 3 //3 elements 1 //1 element
And I want to do a selection sort it in descending order which the row with 5 elements will come first then 4 then 3 and so on. So that it would look like this
1 2 3 4 5 1 2 3 4 1 2 3 1 2 1
Code: void selectionSortDescending(int list[MAX_ROW], int size){ int temp; int walk; int curr; int large; // index of the largest element
A user is supposed to enter student name, id, and grade then sort them by name, id, or grade. I managed to get it to sort by name and id correctly, but not by grade.
I've tried searching for answers around the web but everyone is using syntax that We haven't been taught before in class yet. I understand that the string library is probably the most efficient way of doing this but is there a way without using that library? Like using if, for, while etc. instead?
I've been told that using anything else other than the string syntax is far to complex but I think the more complex it is the more I will understand it.
i have a matrix containing a lot of points and each point has its coordinates x and y. That is a nx2 size array. I want to sort it according to the first column ascending, with x coordinates. For points that have the same x coord i would like to sort according to y coord. Here is what i did and i cannot get a good result.
Code:
#include <stdio.h> #include <stdlib.h> int main(){ int a[5][2] = {{1,0}, {4,2}, {2,4}, {8,6},{4,8}}; int temp=0; int i=0; int j=0;
Here's the objective of the program: "Instead of using ABCDEFGHIJ to order letters use DCBAJIHGF go order. The program should determine which 4-letter word is larger of two based on this new ordering system."
Not even sure how to start with this problem , how would I go about defining my own ordering system?
I have been working on this program for days now and for some reason my program will not write to my third file. It will call all of the integers that I need it to call but it will not write them out to a file. How to use my loop correctly.
#include <iostream> #include <fstream> using namespace std;
I'm new to C++ especially vectors.. I've a question regarding sorting of object in a vector.. My object consists of x,y and civ. so I would like to know how do I sort the value of the civ in an descending order but at the same time retaining the value of x and y attached to it..
i need to print the names as they appear in the original file, print the info of the person with the highest distance, print the info sorted by ascending ID number, and print sorted by name alphabetically. the first two parts work fine but sorting by ID and Name dont work.