General C++ Programming - June 2013 (Page 28)

help!random_deivce
 
i just want to generate a random number, and copy a code from others: #include <iostream> #include <random> int main() { std::random_device rd; for(...
[3 replies] Last: thanks both of you very much. i will go to add and fix into my program... (by huang11404)
by Daleth
Container of a class with a container of a class
 
Say you had a couple classes like the following: class Basic; class Intermediate{ public: /*some functions*/ private: std::vector<Basi...
[1 reply] : Nope (by ne555)
Program Menu choice skips over input
 
Hello everyone, I just recently finished up a program that implements Dijkstra's Algorithm and I thought I would make a nice little menu for the user. so the...
[2 replies] Last: That fixed it. Thanks a bunch Yanson! (by tay1392)
How to read selected letters
 
Hello, I have a text file in which i need to read only selected letters and substitute them with integers to calculate. Eg:- In the text file f2,h1 ...
[1 reply] : you can use the .get() member function for a file so that you can comp... (by jasonXcoder)
no matching function for call
 
no matching function for call to `getline(std::string&, char&)' Why is this error occuring? HELP ME SOLVE THIS My Aim is to copy each character or integer ...
[2 replies] Last: *edit* (by jasonXcoder)
floating point overflow
 
hello and sorry for my english. why does this piece of code: for (int i=15;i<30;i++) { long double A=2013; long double B=pow(10,i);...
[4 replies] Last: mm ok, I understand, thank you very much :) (by cabeto14)
Partly recompilation generates invalid address fault?
 
I'm making an x86 emulator with C++ (currently 8086/80186 with some little unfound errors). When I'm compiling all the files (deleting all *.o files and running...
[1 reply] : undefined behaviour is undefined. That's the best guess with the infor... (by ne555)
bit problem
 
Hi give me a hint for following problems 1 The numbers are exactly N bits wide and they have no leading zeros. 2 The frequency of zeros and ones are equal....
[3 replies] Last: for #1 if N is 6 4 should looks like 000100?? N would be 3 here, a... (by closed account o1vk4iN6)
What is the best Auto-documentator for Codeblocks?
 
Question is title. Thanks. I need one since my project is one-man run right now & is suffering from lack of documentation. Are there better free alternatives to...
[4 replies] Last: someone must be experienced with this at least a little. (by DeXecipher)
Problem with friend class from multiple files/namespaces
 
Essentially I have two header files, one called 'ACYDTypes.h' that contains the classes for the basic types of this system and the other called 'Settings.h' tha...
[no replies]
time stamping
 
I'm writing a program and i have an array of structs, I need to overwrite elements in the array such that I am overwriting the least recently used. So i have i...
[5 replies] Last: Do you actually require a time to know which block was committed earli... (by andywestken)
Reading contents And Calculating
 
HELP!!I need to know whether in c++ we can read values from a .txt file and use it to calculate something. EXAMPLE:- In the TEXT FILE- FoodCode: f2,f3,...
[2 replies] Last: Thank you, well i found how to read only the second line and i'll try ... (by naveen19)
by xxeus
How to create auto clicker+typer in C++ ??
 
Okay so what I want to do is :- Create a program that can, say for example, switch to an already opened up google search page. Type in a given string and pres...
[1 reply] : For windows we use SendInput() for this kind of thing. http://msdn.mic... (by modoran)
"Magic Matrix" Calculations issue
 
I am attempting to create a program which calculates the product of 4 vertical values in the matrix. The numbers are supposed to be randomly generated and the s...
[2 replies] Last: Ahh brilliant of me that was. Yes I will make it pretty once I get ... (by derkthar)
binary number input
 
I am new to C++ language, could any one help me to figure out " how to take binary number as an input, generate partial products by bit-wise multiplication and ...
[5 replies] Last: Here you go. It validates input and formats the output. It's probably ... (by h4ckb0x7)
by a sk
** operator
 
A very basic question. What does the ** operator in C++ do? For example: int **matrix; It appears to be a pointer to a pointer. In the above example, i...
[2 replies] Last: In a declaration like int** matrix; * isn't an operator, it's a d... (by andywestken)
Sentence Capitalizer
 
From the textbook: Write a function that accepts a pointer to a C-String as an argument and capitalizes the first character of each sentence in the string. ...
[2 replies] Last: Maybe? sentence == '.' Like on line 35 and 41? Edit: Actually,... (by andywestken)
by Daleth
Setting up a makefile
 
IDE: Code::Blocks v12 Compiler: g++ I am waaaaay out of my comfort zone here. I am trying to write a makefile, so I can avoid this directive with ellipses in ...
[2 replies] Last: Oop, sorry. That was a typo. And thanks. (by Daleth)
Can anyone with 64bits computer help out?
 
I am currently studying a Stanford course by myself for fun. It provides executables containing sample output that are compiled in 64-bits, but my laptop is 32-...
[2 replies] Last: hmm, there aren't any sources to the homework problems, except for the... (by andrenvq57)
June 2013 Pages: 1... 262728
  Archived months: [may2013] [jul2013]

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