49,761 Topics

Member Avatar for
Member Avatar for Sarkurd

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 …

Member Avatar for Sarkurd
0
359
Member Avatar for kamlesh malav
Member Avatar for andrew mendonca

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 …

Member Avatar for Hiroshe
0
375
Member Avatar for ankit.4aug

[CODE]int *a; char *c; *(a) = 20; *c = *a; printf("%c",*c); [/CODE]

Member Avatar for Suchita_1
0
140
Member Avatar for Yahia Farghaly

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.

Member Avatar for Yahia Farghaly
0
338
Member Avatar for tentrabyte
Member Avatar for Neuman
0
106
Member Avatar for Miguel24.07

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

Member Avatar for Lucaci Andrew
0
223
Member Avatar for tentrabyte

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: …

Member Avatar for Tycellent
0
519
Member Avatar for Gisele

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

Member Avatar for chibi-hime
-2
152
Member Avatar for Pineas

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. …

Member Avatar for Pineas
-1
258
Member Avatar for AZERIOMON

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 …

Member Avatar for Sarkurd
0
297
Member Avatar for phony

> 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 …

Member Avatar for rubberman
0
176
Member Avatar for ptolomeo

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 …

Member Avatar for mike_2000_17
0
295
Member Avatar for Ivzirnalsradeys

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, …

Member Avatar for Taywin
0
234
Member Avatar for rehan_5

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?

Member Avatar for sanjulovers
0
3K
Member Avatar for iceparticle.com

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 …

Member Avatar for sanjulovers
0
215
Member Avatar for Entalist

/*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 <= …

Member Avatar for Entalist
0
2K
Member Avatar for new_developer

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: …

Member Avatar for Moschops
0
535
Member Avatar for Hussain_3

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[] …

Member Avatar for tinstaafl
0
1K
Member Avatar for Tycellent

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 …

Member Avatar for Tycellent
1
448
Member Avatar for nhrnjic6

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>' …

Member Avatar for nhrnjic6
0
298
Member Avatar for Goyang
Member Avatar for Aya_3

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 ?

Member Avatar for mike_2000_17
0
286
Member Avatar for cambalinho

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 …

Member Avatar for cambalinho
0
1K
Member Avatar for iqra aslam
Member Avatar for Sam_6
-1
228
Member Avatar for tan.revilleza

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

Member Avatar for Sam_6
-1
258
Member Avatar for kanaly.john

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

Member Avatar for Sam_6
0
118
Member Avatar for myk45

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 …

Member Avatar for myk45
0
5K
Member Avatar for Jjajangmyeon

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 …

Member Avatar for Jjajangmyeon
0
246
Member Avatar for cambalinho

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 …

Member Avatar for mike_2000_17
0
552

The End.