General C++ Programming - July 2014 (Page 4)

Ignoring punctuation when copying cstrings
 
First time post so forgive me if there is some rules I don't follow. Now, I have an assignment in w...
[6 replies] Last: Duoas, I know but this is for an assignment at school and we are requi... (by dfish565)
statement position
 
Hi. Here I have a code snippet. It's curious: cout << musicMap.size() << endl; //0 is printed ...
[16 replies] Last: Let's simplify the snip char buffer ; char *ptr = NULL; ptr = new ch... (by ne555)
How can Build a program like UPX?
 
hi How can Build a program like UPX for compress exe files with Dedicated Algorithm? test this: h...
[4 replies] Last: If you are using Windows, there is no reason why Microsoft Essentials ... (by Duthomhas)
Twin primes program
 
This program prints out the total number of up to 100,000. What I'm trying to figure out how to do i...
[4 replies] Last: On the other hand you know that if primesCount is greater than one, ... (by handoftheking)
lexicographic order!
 
Hi guys. Ok so i have the following problem. I want to implement a lexicographical order of some cha...
[2 replies] Last: There are several problems. First off your program flow is wrong, yo... (by Codermik)
Structures and Arrays
 
Guys, I've been trying all day, and am lost. Please just point me in the right direction. Code first...
[5 replies] Last: oh.....cool. thanks! (by cavendert)
Need some help with a sortment
 
can anyone show me an input of an lexicographic order that stops when you insert "stop" from the key...
[1 reply] : stop (by helios)
by the411
How to sort integers in a stack in ascending order
 
Hi, i am pretty much new in C++ programming and i have to do stack exercises. Can someone write a s...
[6 replies] Last: You don't need more than one additional stack. (by Duthomhas)
by zxrp
Counting number of occurences of a word in a text file
 
I've been struggling with this for a while, I have to write a function that accepts a word (in my ca...
[6 replies] Last: http://rextester.com/MXBHP77365 (by Smac89)
by vlkon
Handling C++11 <random> - separate class and *.cpp file
 
Hello everyone, I wanted to ask for an advice about how to create .cpp file (new class) that will h...
[4 replies] Last: I think that you've got some typos. Missing semicolon on line 16 rand... (by ne555)
by judo11
How to count the students who got the highest and lowest score?
 
I can display the highest and lowest score but I can't display the number of students who got the hi...
[2 replies] Last: Thank you sir I learned a lot from you. (by judo11)
by Mats
Pathfinding
 
I'm trying to find vertical paths of length n through a 2D grid of numbers. Paths may connect orthog...
[11 replies] Last: You can initially copy the data stored in the grid into arrays of x,y... (by keskiverto)
A code that doesn't work
 
Hello .My program doesn't behave as I expect it. This code doesn't prinnt 'c', why? char **w...
[4 replies] Last: cout <<strlen(audioBuffer); outputs 50972 and audioBuffer is defin... (by hooshdar3)
Unexpected Output
 
In my code below, if you enter an incorrect age, it starts the program over.. After you enter a corr...
[3 replies] Last: a) ok b) i didnt say use the namespace called std. i said that specifi... (by Little Bobby Tables)
by Anns
Void pointer
 
Hi, I have a query regarding void pointer. Can any explain what happen when below snippet runs. ...
[12 replies] Last: Thanks. Here thing is that A.cpp includes B.h also. (by Anns)
Socket Programing
 
Is there a simple demonstration that someone could show me on how to take user input from a C++ prog...
[2 replies] Last: I think we can cheat a little bit, use the specific URL instead of inp... (by lsk)
Binary search tree (Distance from node to root)
 
Hi, so, I need some help, I'm new to this BST thing, so, I don't understand most of the function reg...
[3 replies] Last: Kind of that, does it work as you want ? (by lsk)
Dynamically allocate array of strings
 
I know I can allocate it this way, on the stack: char* str ; for(i = 0; i < 5; ++i) { s...
[6 replies] Last: Another way is like this: int *data = new int [width * height]; int ... (by joe7)
'SFML/Audio.hpp' file not found ?
 
I am using SFML for the very first time, and I have no idea why I'm getting this error. I'm pretty s...
[3 replies] Last: Thank you both so much. It turns out I had messed up a bit because I d... (by closed account j1CpDjzh)
by zxrp
Counting number of occurences of a word in a text file [UPDATED]
 
I have to write a function that accepts a word (in my case the word is "the") and file pointer, and ...
[1 reply] : That shouldn't compile. Fix that then try again. BTW, std::toupper() o... (by Duthomhas)
July 2014 Pages: 123456... 26
  Archived months: [jun2014] [aug2014]

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