General C++ Programming - November 2014 (Page 17)

Help me write BST tree to file
 
Hi . I can only write one value to file, but I want all values written: get all, say for example barcode char* bst:: get_bar(hwareItem*& root){ ...
[6 replies] Last: Thanks! its working.. (by csstudent123)
Editing text file in c++
 
Here is the problem. PROGRAMMING PROBLEM You are requested to create an inventory control application for a drink stall (give a name to the stall). The applica...
[1 reply] : One of the first things I see is this: The records are to be saved a... (by jlb)
by Magarf
A rotation problem
 
Hey everyone, I had a few questions and I would really appreciate it if you can help me with that :) I am working on a facial expression detection project...
[1 reply] : Sorry I can't help much, but you can't rotate a 2D frame of video that... (by Duthomhas)
Generating random numbers
 
for (int i=0; i<15; i++) { nx =rand()%8+1; printf("%d",nx ); } I want to the function of timer "srand(time(NULL))" to generate ...
[1 reply] : The snippet of code you posted works OK for me after adding in a few m... (by wildblue)
Can you help?
 
Im getting this error and i'm a relative neophyte to programming so could some help me? "fatal error LNK1169: one or more multiply defined symbols found" H...
[3 replies] Last: Thank you both for your help I had written my code in the stdafx.h fil... (by MichaelN2)
Do you believe smart pointers teach bad habits (1,2)
 
Hey guys, I would like to hear your opinions on smart pointers. The main question I have is, do you believe they teach bad habits when it comes to managing memo...
[31 replies] Last: but the new and delete statements look alright At least std:string co... (by MiiNiPaa)
Trigonometry problem C++
 
I am trying to make a 2D shooter using C++ and SFML 2.1. A machine gun is positioned somewhere and it turns towards the mouse pointer. Now I need to implement s...
[3 replies] Last: > Now the gun... > What am I doing wrong? In order to know what you ar... (by ne555)
Mixing samples of multiple (1+) channels?
 
I'm currently using the following formula: SUM(channels)-(PRODUCT(channels)/USHRT_MAX) to mix all my sound channels (which are already prepared to the same ...
[2 replies] Last: I removed the functionality, just simply SUM(channels) and finally cli... (by superfury)
SF2 24-bit samples with 16-bit renderer?
 
My renderer uses 16-bit samples (short). The soundfont might use 24-bit samples or 16-bit samples. If 24-bit samples are used, is it worth downsampling the 24-b...
[4 replies] Last: Assuming that isn't an RGB triplet, yes. (by Duthomhas)
Trying to Parse and Edit a Text File
 
I have this project for school where I basically need to write a program that will take any text file and convert it into html code. string line; int line...
[2 replies] Last: Don't loop on EOF. while (getline(inFile, line)) { ... } You... (by Duthomhas)
cannot fix the error in the below radix sort code
 
#include<iostream> #include<conio.h> using namespace std; void radix_sort(int*,int); int count(int*,int); main() { int a ,n; cout<<"\nEnter the no...
[no replies]
member function to shuffle content
 
Hi Is there member functions for STL's like vector,list etc., to shuffle the content of that STL. eg: int arr = {1,2,3,4}; std::vector<int> v1(arr, arr+ s...
[2 replies] Last: Hi Peter Thanks for the information.... :) (by raju8438)
Help with Arrays and Functions
 
I'm writing a program that will read an array from the user, and then it will output the array back to the user, find the minimum value, subtract the minimum va...
[4 replies] Last: IN all of your functions, you do not use a argument at all. You crea... (by MiiNiPaa)
red-black tree insert issues (SOLVED)
 
I'm working on a red black tree assignment for my class and I'm having some trouble with the insertion function. My problem is that my root node value is being ...
[2 replies] Last: I actually got this figured out earlier today, thank you for the help ... (by pomopwner)
Matrix multiplication (1,2)
 
Hi people. New to this site, new to c++ so excuse me if i lack the normal decorum. Im writing a program thats supposed to multiply 2x2 matrices together, mul...
[35 replies] Last: @Doas If he doesn't want to lift off from the launchpad and fizzle ou... (by closed account 48T7M4Gy)
Problem about defining a class
 
class Molecule { public: int state; Molecule(); void Generatepoint(int nMolecule,int nx ,int ny ); }; When I define a member function, ca...
[2 replies] Last: int nx , int ny is fine they equal to int* nx,int* ny (by mzzz)
Convert String to C++
 
Hi I would like to know how I can convert a string which represents a date to an integer. #include <iostream> using namespace std; #include <string> ...
[2 replies] Last: first convert, day_string = "10"; then day_int =10; same as month and... (by anup30)
function definition problem
 
At the end of the program where i have my function definiton it's giving me an error that says that the function definition is not allowed before '{' Here is m...
[4 replies] Last: Then we would be out of a job. You wouldn't want that, right? (by YokoTsuno)
template build error, simliar with chromium callback module
 
I am reading chromium source code about callback module , and I tried to write a simple example as below, but the code can't compile successfully , could you he...
[no replies]
if statement problem
 
Hello, I have recently started C++ and just made this program to test if statements to create a numerical password. However, it only gives me the "wrong passwor...
[1 reply] : If your numbers start with a zero, they are treated as octal (base 8) ... (by Disch)
November 2014 Pages: 1... 1516171819... 32
  Archived months: [oct2014] [dec2014]

This is an archived page. To post a new message, go to the current page.