49,755 Topics

Member Avatar for
Member Avatar for daino

Would anyone know what the PNG Include directory variable should be for CMAKE. I can't seem to find a Cmake module to search for PNG in the program which depends on LIBPNG (unlike all it's other dependencies). I've been using PNG_INCLUDE_DIR but CMAKE doesn't seem to recognise it? thanks.

Member Avatar for daino
0
8K
Member Avatar for bdl365

i need to write a program that ouputs any five positive integers to the screen? for (int i = 1; i <= 5; i++) cout << rand () // what goes here? usually when there's a range (lets say any 3 digit number) i usually do it like this cout …

Member Avatar for markaburlingame
0
85
Member Avatar for mtm6042

I am having trouble finishing this code for an assignment i have due. I have to create a code that (depending on what the user picks) sorts the numbers in ascending or decending order using an array with the funcion in the code. Any help would be greatly appriciated. #include …

Member Avatar for markaburlingame
0
153
Member Avatar for stephaniec

Please help me with following problem (I am struggling in a class that I really shouldn't have taken, and I have absolutely no idea where to start, or how to continue with it): Write a program that can be used to assign seats for a commercial airplane. The airplane has …

Member Avatar for Ancient Dragon
0
343
Member Avatar for Seni0RRunn3r

What's up guys? I have this question....I'm trying to extract a number from a stream after I extract a charachter but after charachter it displays ASCII value, not the actual number: cin >> ch; num1 = cin.peek(); cin.ignore(80, '\n'); cout << ch << num1;

Member Avatar for Seni0RRunn3r
0
2K
Member Avatar for Magda6347

I've been trying to do this asteriks triangle with nested loop for days and many hours and still no luck. Im using visual studio 2010 and I've been searching the web for clues and everytime I use the cout, anything iostream, const char and more it always fails I'm not …

Member Avatar for Ancient Dragon
0
233
Member Avatar for Enders_Game

Pretty self explanatory code. Why doesn't it work! #include <stdio.h> int main() { __asm__("number dw 0"); // declare number? printf("%d",number); __asm__("mov %eax,number" "inc %eax" "mov number,%eax"); printf("%d",number); return 0; } cc ex1.c -o ex1 ex1.c: In function ‘main’: ex1.c:22:17: error: ‘number’ undeclared (first use in this function) ex1.c:22:17: note: each …

Member Avatar for Enders_Game
0
278
Member Avatar for vishalonne

Hi Everybody I am trying to create a template class here is the code I trying to just add and multiply 2 number. But I am not able to do so using template class. class calc { public: template <class T> T multiply(T x, T y); T add(T x, T …

Member Avatar for mike_2000_17
0
209
Member Avatar for abhishekbalaji

I am just beginning to learn pointers and I have a question regarding accessing the values using the address. Suppose we have an array of say 10 elements and I begin to access all the elements starting from the 10th element, and go on untill i access the 0th element... …

Member Avatar for MandrewP
0
127
Member Avatar for pbracing33b

I have a program that is suppose to find the percentage of occupied rooms in the hotel. I have most of my program running, but when I try to typecast my percentage the percentage isn't coming out right and I am not sure as to why. I have set a …

Member Avatar for Ancient Dragon
0
99
Member Avatar for ranam

hi , i have a 3 columns with content and can be sorted and now i want a small symbol on them when that column is sorted like if column one is sorted then the symbol should be on 1 similarly for rest, And thank you very much for ancient …

Member Avatar for Ancient Dragon
0
124
Member Avatar for liphoso

How would i go about declaring an array that has pointer to linked lists? i need to create an array that has 28 elements(28 letters of the English alphabet) of char type and each of them should be a pointer to a linked list that will store words. i am …

Member Avatar for Ancient Dragon
0
186
Member Avatar for triumphost

Ok I know the difference between delete and delete[] BUT this question just all of a sudden popped in my head since "NOTHING" happens when I use delete[] for all purposes. Now I know when to use one or the other but it still for some odd reason bothers me …

Member Avatar for mitrmkar
0
161
Member Avatar for daino

How do I set the CMAKE_INCLUDE_PATH? Also... How to I set the CMAKE_LIBRARY_PATH? All i know about CMAKE is that is is a GUI with very limited options. Where do I put these variables and why do I set them? How do I set them? Thanks

Member Avatar for daino
0
11K
Member Avatar for Hopp3r

Ok, so I've recently been learning to code in c++, but I'm getting a little confused on how you read files to functions. For instance, say that I have one file with a list of other files in it. The information within the second set of files (each file) contains …

Member Avatar for triumphost
0
3K
Member Avatar for pepsi123

I'm struggling with C++, especially when it's about sorted list. Do they work like arrays? This is what I'm trying to do: 1. Student applicants will now be stored in a link-based sorted list. 2. Student applicants will be organized into two lists: one for female applicants, and one for …

Member Avatar for Lerner
0
153
Member Avatar for MattyRobot

i have spent some time trying to install glut in code blocks and so far I haven't succeeded. i have downloaded the glut-3.7.6-bin [URL="http://www.xmission.com/~nate/glut.html"]from here[/URL] . I have looked at tutorials on where to put the files in the download ([URL="http://www.sci.brooklyn.cuny.edu/~goetz/codeblocks/#win"]like here[/URL]) but it doesn't work. :icon_question::icon_question::icon_question:

Member Avatar for Mallot
0
289
Member Avatar for Elixir42

I have a function to detect if the mouse is over a mesh but what if I had a hard coded square. I am using D3DXIntersectTri() and pluggin my vertices into it. but they (obviously) dont update when I move the square. My question is how do you get the …

0
63
Member Avatar for Elixir42

I have searched on the internet for a 'working' double to char* does anyone have any idea? I need to pass the string to a function that takes a char* as an argument.

Member Avatar for Elixir42
0
3K
Member Avatar for kikechithomas

HI, I AM THOMAS. I AM IN A COMPUTER PROGRAMMING CLASS AND HAVE BEEN GIVEN AN ASSIGNMENT. I HAVE TRIED TO FIGURE IT OUT FOR A WEEK WITH NO SUCCESS, READ DIFFERENT BOOKS AND VISITED VARIOUS WEBSITES IN VAIN.I HOPE I LANDED THE RIGHT PLATFORM TO HELP ME OUT. THE …

Member Avatar for Lucaci Andrew
0
143
Member Avatar for steveaustin

how i do this problem, i dont understand this problem plz everyone can help me Write a grading program for a class with the following grading policies: a. There are two quizzes, each graded on the basis of 10 points. b. There is one midterm exam and one final exam, …

Member Avatar for dagurr
0
705
Member Avatar for MasterHacker110

I am trying to make a program that will check the remaining number of an item left in stock and that will, if someone buys it, subtract the amount of the item bought and then re-write it into the database... (Something like what they use in some stores) How do …

Member Avatar for Lucaci Andrew
0
402
Member Avatar for kshahnazari

Can someone help me with a funtion that find a string in another one ? the example is string a= "hello how arsdddf" , b = arsdd ; I want a funtion that if b exists in a gives me the number that begins with it like it must give …

Member Avatar for L7Sqr
0
79
Member Avatar for ranam

I want to know how exactly to add the button at the top of the search to note as the search criteria is for example asc to desc or vise versa ![kk[](/attachments/large/1/kk[.JPG "kk[") that is here i need a icon beside the colors to show me when i search weather …

Member Avatar for ranam
0
157
Member Avatar for acerious

This is what i have so far guys, //LAB 6 #include <iostream> #include <cmath> using namespace std; double getSides () { double sideA, sideB, sideC; cout << "Enter three sides: " << endl; cin >> sideA >> sideB >> sideC; } bool formTriTest (double sideA, double sideB, double sideC) { …

Member Avatar for NathanOliver
0
206
Member Avatar for m20072

Hello, i have got no expereince at all with c++.. im just adding something to the source of my private server and i failed to do so because of the fact that it wasn't a tutorial on how to add it (just a release) so here is the error: error …

Member Avatar for m20072
0
664
Member Avatar for ymdeek

I need a way to return the maximum value of five numbers This is the explanation •function -- identify the maximum value of the five integers ◦function name: maxValue ◦function parameters: five integers, pass-by-value ◦function return: the maximum value of the five integers, as an integer This is what I …

Member Avatar for nndung179
0
226
Member Avatar for prahesh

Example: #include<iostream> using namespace std; enum e_UserName { planet1, planet2, planet3, planet4, planet5, planet6, planet7 }; enum e_ServerName1 { Venus = 11, Mars, earth }; enum e_ServerName2 { jupiter = 11, pluto, neptune, earth2 }; struct map { enum e_UserName eUserName; enum e_ServerName eServerName; }; struct map name[] = { …

Member Avatar for prahesh
0
186
Member Avatar for darkrandomness

I'm new at this. But I'm taking a class and I need to turn this in by Friday. Please help me. I can only use strings and arrays. My hangman program needs five things: 1. user is prompted for a word that is ten letters or less, or else the …

Member Avatar for darkrandomness
0
251
Member Avatar for pepsi123

I keep receiving these error messages: Applicant.cpp:25:6: error: prototype for âvoid Applicant::setDeposit(char)â does not match any in class âApplicantâ Applicant.h:12:7: error: candidate is: void Applicant::setDeposit(bool) Applicant.cpp:29:6: error: prototype for âchar Applicant::getDeposit()â does not match any in class âApplicantâ Applicant.h:13:7: error: candidate is: bool Applicant::getDeposit() Applicant.cpp:71:5: error: prototype for âint Applicant::addPoints(int)â …

Member Avatar for pepsi123
0
170

The End.