General C++ Programming - September 2012 (Page 5)

replace newline with some text
 
my content : 1234 56789 abcdefgh ijklmnop what I want : 1234 56789 something here.. abcdefgh ijklmnop I've thousand of line, so it's hard to copy and p...
[3 replies] Last: I've thousand of line, so it's hard to copy and paste.. the method sh... (by cire)
Need help getting my loan calculator to loop
 
I am having a lot of trouble getting my loan calculator to loop. My program is meant to prompt a user for some info, do some calculations, and create an amortiz...
[2 replies] Last: @GamerDJX For one, the variables were never changed inside your loop,... (by whitenite1)
newbie
 
Hey guys, I'm new to c++ field, so i have some questions that i think you guys might could help me with for a better understanding. how real-time audio and gra...
[no replies]
Variadic template functions
 
I'm currently trying to understand some of the new features in c++11 and i've come across a problem with variadic templates. What I'm trying to do is define ...
[3 replies] Last: Thanks a lot :) That's exactly what i was searching for, problem solv... (by AleaIactaEst)
Using a usb as a "login key"?
 
Hello, I'm trying to get a usb to work as a "username/password" thing. For example: to login to a simple account one must plug in their usb(which i know hav...
[1 reply] : It all depends on the OS/Login Process. This isn't quite what you're ... (by kbw)
manage 7.1 sound card with portaudio
 
how can i play 8 independent sound with 7.1 sound card with portaudio?
[no replies]
classes
 
hallo everyone, i am learning about c++ classes. the code below works but can you tell me why the sum result is wrong? // classes example #include <iostr...
[9 replies] Last: He means what he says. int area() const can still use x and y to... (by Peter87)
multithreading in C++ using POSIX
 
hi, how to implement multitheading using POSIX threads...? pthread_create( &thread1, NULL, print_message_function, (void*) message1); Here, thread is cre...
[4 replies] Last: You're asking for trouble if you don't use thread classes. It constra... (by kbw)
Sorting two arrays, one of which keeps original location.
 
Hey guys, have two arrays, string a = {"3","2","1","1"} int b = {0,1,2,3} I want to sort a into order, but at the same time, sort a into the same orde...
[3 replies] Last: Awesome, thats freaking great! How would I then reverse this, I just ... (by RadMabbit)
How do I find out what is pushed in the stack
 
I am using Visual Studio and I have this C++ recursive program. When I call the recursive function and it pushes local variable in the stack. how can I see what...
[3 replies] Last: JellyFox, Thank you, I thought once I pushed it I will not know what ... (by mendozae)
Trouble with loop
 
In my Computer Science 1 class we have an assignment were we ask the user the maximum value that one side of a right triangle can have. Then find all of the pyt...
[2 replies] Last: Yes. That was my problem. Thanks so much! (by frenijanks)
Extracting substrings
 
My situation is as follows: #include <iostream> #include <string> cin >> word; cout << word.length(); [suppose that the string "I am" was input by the ...
[2 replies] Last: But how do I use getline(cin, word) to get the exact number of letters... (by edison84)
UML, class heirarhies, documentation: looking for app
 
I am coding a game engine that is totaling over 19 thousand lines (not including blank lines and comments). I am currently using Dia to graph out class inherita...
[no replies]
How to Create a C++ program
 
Write a program that reads in positive integers until the user enters a 0 to signal end of input. The program should then print the smallest and largest of the ...
[1 reply] : Use a while loop while(input != 0) (by TheJJJunk)
Trouble with a date validator
 
I'm still working on this date class, and I'm up to the point where all my overloaded operators are set up correctly, but I'm having a problem with my dates val...
[7 replies] Last: Or that works too! Haha In any case, I see now that I wasn't working ... (by AdamBomb89)
Overloading new and delete
 
Hi there , Overloading new and delete usually involves assigning memory using malloc(size) and deallocating using free() (in cstdlib library). However , I cann...
[4 replies] Last: What kind of speed difference are you expecting Raman? It's done in ga... (by JellyFox)
inline bool operator < declaration
 
Hi all, i am doing the following. struct Adjacent { string name1; int distance1,fare1; }; inline bool operator<(const Adjacent &m, const Adjacent ...
[6 replies] Last: Could any one please post some link where I can read about the functi... (by bikram07)
Recursive Function
 
The program should be able to read a file and reverse all the words inside, using recursive function. This is my entire code. DO not bother about the main I...
[no replies]
Checking if a variable is assigned to another one
 
Alright, so I'm wondering how I can check whether one variable is ASSIGNED to another variable (as in, statement is true if Var A is assigned to var B). However...
[12 replies] Last: Ah I missed that bit. Okay that make sense. (by Disch)
by iky
output problem?
 
hi. im having a problem with my program. i want to print the final score but if it is negative i want it to be 0 in the output. with this i get both the negativ...
[2 replies] Last: thank you. you are awesome :) (by iky)
September 2012 Pages: 1... 34567... 32
  Archived months: [aug2012] [oct2012]

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