49,761 Topics
| |
Hello, I'm writing a c++ code that reads a wav file and stores read values to a 1D array of integers. After doing some manipulation, I am able to write the values of the array to a new output wav. I use libsndfile library to do the reading and writing … | |
Hi, I need to make application that will act as server and have clients. computers with client will get permission to go to internet or not via server. Only permission to go but they will connect directly on net (not a firewall). Its some sort of internet cafe management depending … | |
Hi, Hope the stated 2 snippets are logically same. But I am getting error for the second code snippet. Generally the ternary operator statement is similar to a if else statement. regarding the second code snippet, where by the continue keyword is used in the ternary opertor statement. It throws … | |
heres my code. i need a triangle that looks like: **** _ *** __** ___* but mine looks like: **** *** ** * can anyone help ? [CODE]void drawTriangle(){ //function to hold triangle code char c; //variable to hold character to make triangle int height; //variable to hold height of … | |
Hi, I am trying to compare 2 vectors to remove any kind of overlap. I have written a simple program but it gives a segmentation fault once I increase / decrease number of vector elements in both. Is there a better way of doing this. Especially suppose one of the … | |
Rational fractions are of the form a/b, where a and b are integers and b≠0. Suppose a / b and c / d are fractions. Arithmetic operations on fractions are defined by the following rules: a/b + c/d = (ad + bc) / bd a/b – c/d = (ad – … | |
Hello All, I seem to be having a relatively small problem with a Maze program I'm working on. Basically, I read a txt file containing a maze into a 12 x 12 2D array, but the problem is when I try to display it, none of the white spaces that … | |
Hello I am working on a program and have become pretty confused... I am supposed to write a program that will convert html colours expressed as 6 hexadecimal digits to their individual red, green, and blue components expressed in decimal. If anyone can help me out with some pointers of … | |
I am looking to take a course in C++, but is that language popular now, or is everything more C? Please advise. | |
I need to print the level order traversal of an AVL tree. I know how the idea works using a queue: enqueue the node, and then enqueue the left and right nodes of it. every node has a int data which needs to be printed but then the thing is … | |
Hi, I'm finding generic container like vector but that can hold any variable just like a Python list. Thanks | |
Hey friends, I want to know how does the IP Messenger work? How does it detect all the available online users? I searched on the web but due to Cyberoam restriction, I am left with very few options. I go by IP Addresses too, but even then I am not … | |
Hello everyone, I need help. In my assignment i have an input file that contains string data: ----> i love music and chicken. today is the first day of the rest of your life. my name is john. I must change it to the following in the output file: ----> … | |
I need to create a function that uses a loop. This function will open a text file and then must be able to skip a variable number of leading random integers. The program must be able to handle any number of leading random integers. Example if the opened file reads … | |
Why are you able to declare them using the class keyword or typename keyword? Is there absolutley no difference? Thanks | |
I downloaded a dll for head tracking, and have been trying to use it for some time now. I am trying to make a python script that uses it and am getting errors. [URL="http://www.daniweb.com/forums/thread265466.html"]This is the post.[/URL] I posted it in the python forums, and no replies yet, since this … | |
I have an array of 20 elements with numbers between 1 and 8. I need a for loop that will give me the number of elements greater than 1??? | |
Now I am on my way to making a little command prompt program where it types out the alphabet and removes the vowels as a test. BUT, here's the thing, no errors nothing but it doesn't work. Anyway here is the code if anyone can tell me what is wrong … | |
Here is the prompt for my assignment Your third assignment is to write a C++ program that will print out the primes numbers between 2 and 100. However, you must use two functions in your program. The first function, factor, takes an int, n, and returns two factors of n … | |
Hello all! This is my first post to community! I've been writing a program in C++ (not MFC) to get a NTFS ADS file and copy it to desktop. If you don't know what ADS file is, you don't really have to matter, let's say that this program must just … | |
Hi all, I'm doing a 3d pacman game for a university project which has to be written in c++ (3rd year and having never been taught any c++) My problem is that when I initialise the map array I cannot return the value back to the main method. The values … | |
Hi everybody, my name is Candi and I am new here, I was lucky enough to find this forum. I am new to C++ and am teaching myself because I can't afford school at this time, all I can afford is second hand books :( and I am having a … | |
Hello, Can someone break down what this array loop means exactly? Mathematically I can't make any sense of it. I've reread this section of my book multiple times, but it's not sinking in. [code] int alpha[a]; int j; for(j = 0; j< 5; j++) { alpha[j] = 2 * j; … | |
Hello all, like always : D I'm working on a structure program that has an array [B](m)[/B] that asks the user to enter its values, and then it transfers the even numbers to an array [B](even)[/B] and the odd to another [B](odd)[/B]. Both[B] (evan)[/B] and [B](odd) [/B]arays are in a … | |
Hi, Need some help regarding the macro usage. I've a case where the parameter to be passed to the macro function is not known till the point it is called. example: (continuing the example quoted below) - number "12" passed to the " DEFINE_FUNC( n )" macro is determined at … | |
Hey everyone, I have a simple simple problem that is literally driving me insane. Basically, I have a database of numbers seperated my spaces. I just took a segment of my code because I am soooo completely lost with the output!! If the database is: 1 2 3 9 7 … | |
Hi guys, I'm having trouble using a pointer to a vector<float>, it doesn't seems to be responding as I'm expecting it to. Probably a silly mistake on my behalf, but would anyone kindly point it out please. [code] vector<float>* t_matrix; ... cout << "get_t_matrices 0: " << Character::anim.get_animations()[j].get_t_matrices()[0].size() << endl; … | |
Hi, May I ask what is the correct syntax to achieve the following function pointer pattern? I keep getting error C2064: term does not evaluate to a function taking 0 arguments Thank you. [CODE] class Apple { public: Apple(int i) { if(i == 1) { juicer = &Apple::one; } else … | |
Hi! I would like to split vector elements into the two vectors. One output vector shall contain elements that, for instance, are odd, and another output vector shall contain even elements (actually the case is more complicated;). I wrote something like this: [CODE] typedef vector<int> ItemVec; static bool isOdd(const int … | |
I'm having a bit of a problem with a group project. We're supposed to use linked lists in it and I've already created classes for the nodes for the linked lists. The only problem is that I need to make the class point to itself but I'm not sure how … |
The End.