General C++ Programming - August 2011 (Page 7)

C vs C++
 
Hi guys, I know, there are threads out there covering parts of my question and this is a C++ forum, so I might have to change my nickname in a few...BUT: ...
[8 replies] Last: OK, that'll do for me...I don't do all that fancy programming. I just ... (by ZED0815)
for loops statement
 
i have a homework about this, i need to print out: (a's are not included it is use for spacing) 1. ***** **** *** ** * 2. aaaa* aaa* * aa* ...
[4 replies] Last: OK you asked program to do that. I made you one. This will indeed comp... (by closed account 10oTURfi)
C++ String Entering Customization
 
Hello everyone :D, I am making a console application in Dev C++ and I was wondering if the following can be done: when entering a string is it possible to en...
[8 replies] Last: msvc++9.0: #include <cstdio> #include <conio.h> int main(void) { ... (by Syuf)
c++ question
 
#include <iostream> #include <iomanip> #include <cstring> using namespace std; int main() { char packs, month ; int hours, month_hours; double total_A, t...
[4 replies] Last: BTW you misspelled october (by ZED0815)
need to split strings containing both chars and ints
 
I am currently trying to do an assignment, and having a few problems. i am fairly new to C++ so i apologize if this is a stupidly easy question. the task was...
[4 replies] Last: Thank you all for the advice, been really helpfull! i think i should ... (by Matthew Merrett)
help me please - i/o files
 
hey everybody, i really dont know, what i did wrong.. the code worked until i added the writeValues function here's my code # include <iostream> #include <stri...
[4 replies] Last: thanks for your help! it works! I'll try to be more specific and detai... (by hilalatlv)
Visual Studio C++ Array to MFC
 
Hi, I would like to display a an array of 10 integer values in one editbox. It should display one integer first and than after one second another and so on. I a...
[no replies]
Update the console, without completely redrawing?
 
Hi, I have just a quick question. How do I update the console screen, without completely redrawing the entire screen?
[3 replies] Last: It is pretty simple, but requires a little bit of setup. What exactly... (by Duthomhas)
Modifying a Constant Global Variable??
 
Hi, #I am making an audio player in CMD. #I want to modify the song's listSize "const int listSize" which is global to all functions. #I am using a fun...
[6 replies] Last: thanks alot for this compact example. it's time to play with "Class... (by Mubarak)
Error returning void*
 
Hi guys, I#ve got some kind of an issue here. I'm using pthread (POSIX), which is a c library and therefore not able to handle memberfunctions. I wrote a lit...
[7 replies] Last: Thanks alot! (by ZED0815)
How does rand() work?
 
I don't see how a computer can create someone completely and actually "random"- I mean it must get a number from somewhere constant. So I was wondering how d...
[4 replies] Last: It should be noted that there's nothing in the C standard (to my knowl... (by helios)
Same header file in 2 source files problem
 
My compiler gives me a warning for having the same header file in 2 source files. I don't know how else I would make my application.Here is my shorten code: ma...
[6 replies] Last: Note that if you use #define WIN32_LEAN_AND_MEAN it must be be... (by andywestken)
Non Static Member Function Pointer
 
I'm making a game engine. But i have a little problem. I have a CONTROL class which controls keyboard settings. class CONTROL { struct key { ...
[3 replies] Last: Thanks. It worked :) (by tolga gerekci)
C++ String Edit Function
 
Hello everyone :D, I am making a console app in Dev C++ and I was wondering if there is a function that can edit a string by inserting a space after a full s...
[2 replies] Last: Thanks for the help , but can this operation be done after each full s... (by Muhasaresa)
by smelas
Vectors and arrays
 
There are 20 boxes and each box has a size of 0.2 cm. It is something like this: -2.0,-1.8,.....-0.6, -0.4, -0.2, 0, 0.2, 0.4, 0.6,.....,1.8, 2.0 I ge...
[2 replies] Last: Just had too much spare time. Try this... (I didn't check so there mig... (by ZED0815)
POSIX synchronisation
 
Hi guys! I'm writing a numerical simulation, which is supposed to run on multiple cores. (which it already does very stable) I decided to implement POSIX thr...
[2 replies] Last: Ok...Boost seems to have the proper tools for doing so...thanks Athar! (by ZED0815)
rand() isn't very random.
 
rand() produces the same result every time I run it. I have rand() % 10 + 1 here and the output always is: 2 8 5 etc. When I run it again the output...
[6 replies] Last: ...but you are still right. rand () isn't a very good generator. You ... (by Duthomhas)
by smelas
logic question, -array, struct-
 
There are 99 boxes and each box is separated by 2 cm. so the order is something like this: -99, -97, -95, ...... -1, 1, 3, 5, .... 95, 97, 99 I g...
[4 replies] Last: Oh if your answer would be "no" then you need to store lower and upper... (by ZED0815)
by Chathu
Password Masking
 
I'm Taking User Name And Password From The User. Does Anyone Know How To Display Only Stars When User Enter The Password? char pw ; cout<<"Password: "; cin...
[12 replies] Last: yes of course...you print a star before checking whether input is '\n'... (by ZED0815)
Hiding random integers in an array
 
Hi guys! I am not new here, but this is my first post. Actually i have a lot of questions, beginner questions i think. I was thinking about an array which ha...
[6 replies] Last: A user there says this: "I know a better way to generator: 1. get a ... (by Donanza)
August 2011 Pages: 1... 56789... 29
  Archived months: [jul2011] [sep2011]

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