49,761 Topics
| |
Hello I use MinGW 4.8.2 and Qt IDE i tried to use `gprof`, I added the following flags QMAKE_CXXFLAGS_DEBUG += -pg QMAKE_LFLAGS_DEBUG += -pg to `.pro` file and extarcted the `gmon.out` file but i don't know how to convert it to a `.txt` file. the document say gprof options [executable-file … | |
Write a complete program that reads an integer k > 1 from the console and finds the first positive natural number n hat is divisible by all whole numbers between 2 and k inclusive. Your program may only use do-while loops , even if you think a for-loop or while … | |
| |
Hi all, can someone help knowing the difference between char *st="myname"; char st[]="myname"; i know they both is array of charachers but the difference when dealing with them and how they are in memory ? Thanks. | |
Create a program that will accept a character and display its ASCII value. | |
Hi i am new in this world, so i need some help with this. I need to make a program in c++ or c, receive an xml file, and the program count the file labels (<Home> <\Home>) and say how many time repeats the same label. Thanks | |
Write a program that will ask for two integer numbers. Assign the first integer to the first operand and assign the second integer to the second operand. Use the following assignment operators: =, *=, /=, %=, +=, and -= Display the result of each operation. Consider the following sample output: … | |
Write a program that prompts the capacity, in gallons, of an automobile fuel tank and the miles per gallon the automobile can be driven. The program outputs the number of miles the automobile can be driven without refueling | |
APPLIED PROGRAMMING (APR520S) ASSIGNMENT 1 Problem Solving Tools Total Marks: 50 Marks Due: Friday 22 August 2014 Suppose we want to construct a C/C++ program that can be used to calculate the area or the volume for a range of 2-D and 3-D shapes respectively. Consider only the following shapes. … | |
1. Create a class called Record that financial institute might use to represent their customer's record. This class should include one data member of type int to represent the account balance. Provide a constructor that receives an initial balance and uses it to initialize the data member. The constructor should … | |
> names.dat Collins, Bill Smith, Bart Michalski, Mel Griffin, Jim Sanchez, Manny Rubin, Sarah Taylor, Tyrone Johnson, Jill Adams, Andrew Moreno, Juan Wolfe, Bill Whitman, Jean Moretti, Bella Wu, Jeff Patel, Renee Harrison, Rose Smith, Cathy Conroy, Patrick Kelly, Sean Holland, Beth #include<iostream> #include<fstream> #include<cctype> using namespace std; void read_names(string … | |
Hello. I'm desperate because I have one project that uses a third party DLL and receives data in a Vector. The original project works fine in VC6, and compiles perfectly with no errors in VS2010, but when executing it, we get some weird behaviour: - The result (that comes in … | |
For this question, select and name a high-level language you will be discussing. Diagrams might help in your answers. a) Explain how the computer passes control to a subroutine (or procedure) and returns it to the main routine once the task has been completed. b) Explain, giving a relevant example, … | |
hey! i m new and don't know how to read a .dat file in C++. Can anyone help me to put me out of this problem? | |
Hello, can anyone clarifies this? I need to find consecutive segments that are odd or even. For example 2 6 5 = 2 and 6 = **2** consecutive even integers | 1 odd 4 6 8 1 3 = 4, 6, and 8 = **3** consecutive even integers | 1 … | |
/*Write a program which will print all the pairs of prime numbers whose sum equals the number entered by the user. */ #include <iostream> #include <vector> using namespace std; int main() { int maxNum; bool prime = true; cin >> maxNum; vector <int> primeSequence; for(int i = 1; i <= … | |
Hi there, How to set vector size in Class ? I have set vector size at time of daclaration but it does not work. And should we have to deallocate vector memory in destructor ? #include <iostream> #include <vector> //included to use vector using namespace std; class VectorDemo { private: … | |
i have exe file generated by the Compilation of C++ program now I want to pass arguments to the generated exe file through C# and save all of the output of exe file on a .txt file this is What i have done so far public static string RunCmd(params int[] … | |
Hey Guys, Was wondering if anyone could help me with this sort function for a vector of struct type. What i'm aiming to do is to make a score board being based on a player's score and print out the scores (along with the name) in descending order. I've looked … | |
how to write definition head for a template function that returns enum. I got a template funciton List<List_entry>::print_List(){code..} but I dont get how to return an enum. My current head is : template<class List_entry> List<List_entry>::Error_code List<List_entry>::put(const List_entry &x){code..} but it errors me that I need 'typename' before 'List<List_entry>::Error_code' because 'List<List_entry>' … | |
I can't make this game now. I don't know how. please help me | |
can you please help me, how can i read a wav file byte by byte and then play this file without using PlaySound Function. any help ? | |
how can i build a typedef with variadic operator? what i mean is that i need build these: typedef std::function<void(void)> Event;//works fine, but for any parameters typedef std::function<void(...)> Event; //no errors Event test(int x, int y)=[](int x, int y) { int a=x+y; string b=tostring(a); MessageBox(NULL,b.c_str(),"hello",MB_OK); }; in these sample i … | |
hi. how can a decimal value be converted to binary in a c++ program? | |
while loop or doo loop the output should be like this 1 12 123 1234 123 12 1 and 1234 123 12 1 12 123 1234 tnx | |
Write a program in c/c++ that add two numbers which are between 3000000 and 5000000. the result should be shown as "number 1 + number 2 = result | |
Hi All, 1)It's easy to create a window in QT that the user can resize, but when they make the window bigger, all the contents stay where they were in the top left hand corner. They don't grow with the window. 2)Also when the window is launched the size of … | |
OK - I'm stumped I'm filling a 2D arraywith inputs, then when it hits the first function - for some reason the very first value in the array is being changed to -5 If I comment the function out, it's fine - it gets passes and passed back with no … | |
i'm buiding an image class, but i need some information... the C\C++ teach how read binary\text files... but not how the files are build like JPEG, PNG, GIF and others :( i can't find a page for give me the file struture and when i found it, i only see … |
The End.