General C++ Programming - January 2015 (Page 2)

How to use the peek function
 
I am writing a program that reads in information from a text file into an array. I made a struct containing all the components of the text file and within that...
[2 replies] Last: No I don't, it was the only way I knew how. I tried your way and it w... (by CodingPadawan)
Sorting 3 numbers by ascending orders
 
Hi all, I'm very new to C++ and is currently taking an intro to C++ class. We've only covered up to Functions and how to use reference variables inside the ...
[2 replies] Last: I had a feeling that I was doing it wrong. Even though the if/ else st... (by urnixnil)
by bonho
Inter locking problem
 
I have a problem where two threads could be inter-locking in Windows API I have a io_service running in a separate thread, reading data from tcp and posting ...
[1 reply] : What about PostThreadMessage() ? (by Konstantin2)
by MTorp
How do i check if a vector contains garbage?
 
So i have this code: if (get_brick_at(Position(row, column)) == NULL) Where get_brick_at is defined like this: >Brick& get_brick_at(const Position ...
[5 replies] Last: If we also add 'null behaviour' for the null_brick, it becomes the nul... (by JLBorges)
by I3ck
Thoughts on my 2d geometry library? (MIT licensed)
 
https://github.com/I3ck/lib_2d
[no replies]
Generate sha256 hash using X509 certificate
 
Hi, I want to generate sha256 hash using X509 certificate information. But I do not know the order of input parameters. ex: serial : 014B30351483 cr...
[5 replies] Last: Hi, I solved my problem. In certificate there is a section call " tbs... (by dushantha12)
How to read xml file contents in CPP
 
I need a sample program to read contents of any xml file using CPP. Any kind of guidance will be helpful. Thanks.
[2 replies] Last: WHich XML parsing library do you use? If you did not select one, do th... (by MiiNiPaa)
Problem with creating a circular linked list
 
Hello. I've been making a circular linked list and I'm trying to assign each list a "name" and its next "link" but when I run my code it crashes. Soldi...
[4 replies] Last: ohhh I get it. I feel sorry for myself not being able to fix such prob... (by Dolichan)
CMakeLists.txt Help!!!
 
I am trying to configure my CMakeLists.txt file... Right now, I have a folder called "build" where I type make to build the program I have another folder ...
[1 reply] : solved!!! file(COPY <directory> DESTINATION <destination directory>) (by theironlion23)
VGA Text mode using Word addressing mode?
 
I'm building an emulator which implements a VGA card. As far as I know each address is incremented by a byte, word or doubleword, depending on the Byte/Word and...
[2 replies] Last: But according to the odd/even mode, which is set during text mode, all... (by superfury)
Help with Thoughtcrime Detector
 
You are to write a program that is a thoughtcrime detector. Your program will take in as input the names of two files: the fi rst file will contain a list of ...
[1 reply] : You make it to complicated: bool is_book_acceptable(ifstream& f, vecto... (by coder777)
Need help approaching some coding assignments.
 
-Write a program using while loops that prompts the user for a set of integers. -Your program will ask for one integer at a time. If the number 0 is entered, th...
[2 replies] Last: Here I have come with a bit of the changes #include <iostream> ... (by HabibAurangabad)
Generating poisson arrivals
 
There is something I didn't understand. I use the sample given from the cpp reference to generate numbers: const int nrolls = 10; // number of experiments...
[1 reply] : > std::poisson_distribution<int> distribution(4.1) ; > This outputs:... (by JLBorges)
Audio Input/Output
 
So I want to start working on a project I know will take awhile. I want to create some effects for my guitar using real-time DSP. Since C/C++ are obviously fast...
[1 reply] : There are a bunch of audio libraries around that you can use - look th... (by TwilightSpectre)
by Sh0es
Interface.obj Not Found, LNK2019
 
I'm getting a LNK2019 error in my code pertaining to iostream . When I try to get more details it says File not found: Interface.obj. I'm getting the notion ...
[no replies]
How do you count repeated numbers in an array?!
 
So I already gave this a go and will post my code below. The question is about the last loop before the program cout's. i thought the count would keep track of ...
[1 reply] : see http://www.cplusplus.com/forum/general/154188/ (by sujitnag)
Snake Trouble
 
Hello, I have been working with a group of friends to create a snake game and we are at a stand still. There is an error whenever we run a getch(); The error sa...
[4 replies] Last: hello? can anyone help me? The source of my problem in in line 161 of ... (by jasonwynn10)
by tbl99
Pennies for pay
 
#include <iostream> using namespace std; /* Program calculates the salary of a person over a period of time. Program asks user for number of days. Program di...
[4 replies] Last: The loop at line 17 will never exit. What is its purpose? Right now ... (by dhayden)
by Ulutay
Need help please, Traversing a linked list.
 
Hi, first of all im no expert, so i have been trying to create a linked list of "Minions" where each has x coordinates, y coordinates, wp (weapon power), and a...
[3 replies] Last: ohh it worked now by adding the reference, i though passing a pointer ... (by Ulutay)
Sorting integers without arrays
 
Hello, thanks for reading. I have been tasked with sorting a text file with some numbers in it. For example, there can be 5 numbers in it: 1,2,3, 4, and 5. ...
[5 replies] Last: > How do you read in the file in pairs? Something like this: // Pass... (by JLBorges)
January 2015 Pages: 1234... 24
  Archived months: [dec2014] [feb2015]

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