Beginners - September 2015 (Page 35)

question about placement new
 
Hi I was wondering in regards to the code below, every time I compile and run, the addresses of buffer and the address of the st1 structure I have allocated to ...
[5 replies] Last: The pointers contain addresses, so getting the value of the pointer wi... (by Kevin C)
Help with operator overloading
 
Error: warning C4717: 'operator>>' : recursive on all control paths, function will cause runtime stack overflow sf::Packet& operator <<(sf::Packet& _packe...
[9 replies] Last: An operator is just a function that has some syntactic sugar. Rather ... (by keskiverto)
by Zyety
Sorting integers help
 
Another question of the day. A problem where it ask users to input 3 integer and sort it in ascending orders. How do you do this? in its simplest form.
[2 replies] Last: The easiest way to sort is to use std::sort. http://www.cplusplus.com... (by Peter87)
Displaying chart as below
 
Hi, I have found the letter frequencies percentage of the string user inputs and have stored them in an array in which index 0 holds the frequency of 'a' and ....
[17 replies] Last: Thanks a lot. You guys were very helpful unlike people at stackoverflo... (by backslashV)
User inputs numbers into an array
 
I'm working on an assignment. A user inputs a bunch of numbers. "The number of integers input by the user is not known in advance, except that it will not excee...
[9 replies] Last: Because it is not in condition anymore. Why following not work: if() ... (by MiiNiPaa)
resolving circular dependency
 
Hi, If Class A needs Class B and Class B needs Class A, what do I need to include in both header files so that the code can compile? I tried forward declara...
[4 replies] Last: The trick is to have all references to B in A's interface (the stuff t... (by Duthomhas)
by koopey
x++ and ++x great confusion
 
HI guys. Can do simple statements involving x++ and ++x in multiple lines, but this expression in single cout statement is giving very weird result. in...
[3 replies] Last: It's worse than that. You can't have more than one side effect changin... (by dhayden)
by AnumA
What should I learn n ow
 
I have learn C++/OOP basics. Please help me, how can I got to advanced level now ? Thanks!
[7 replies] Last: You should learn that which will permit you to accomplish whatever it ... (by Michael5)
by Zyety
Need some help !
 
How do you code a question that ask if the first integer is a multiple of the second integer? if (a%b==2) { cout<<a<<"is a multiple of b"; return 0; } ...
[3 replies] Last: You are confusing yourself. As you said if a number is a multiple of ... (by Hippogriff)
Code error
 
Please can you help identifying the error within this code. Thank you so much int my_fun(int a, int& b, int c) { a = 2 * a + b; b = c; cout << "In...
[8 replies] Last: Now I understand.. Thank you shadowmouse (by codeextint)
console closing down even after using cin.ignore(),cin.get()
 
dont just give me the solution explain me why this happens, i could just start debugging using ctrl f5 but that wont satisfy me, i either dont want to make a fu...
[5 replies] Last: thanks for answers i fixed it by using cin.ignore method but i used ci... (by closed account E3h7X9L8)
by besurk
N/A
 
]
[5 replies] Last: That wasn't the intention, that's how I read it. You don't give any so... (by ne555)
a simple calculation program using functions
 
Hi there. I am new to c++ and i do not know where I go wrong with the following codes. I am meant to calculate the volume of a sphere with using a function. My...
[5 replies] Last: #include <iostream> using namespace std; double volumeSphere (double ... (by rahul820)
count vowels in a string. how
 
umm, so, erm, i simply dont know how to count vowels in c++ :D. i have a string entered via console and i need to count all vowels.
[5 replies] Last: The code Is like thsi #include<iostream> using namespace std; int ... (by rahul820)
default in switch calling itself when it shouldnt
 
why? void GradeBook::inputGrades() { int grade; cout << "Enter grades (ctrl+z to quit) "; while ((grade = cin.get()) != EOF) { switch (grade) { c...
[4 replies] Last: why not use formatted input instead? (by MiiNiPaa)
Question regarding program organization and using the enum class
 
Hey, so I'm working on a personal project that needs to expand well and work as a base for a lot of other possible programs. I've organized several classes, but...
[13 replies] Last: No you wouldn't usually have a namespace of all constants. However if ... (by shadowmouse)
SFML - How To Control Animation Speed (1,2)
 
I'm learning SFML at the moment. One of the things I've managed to do so far is animate through a spritesheet and move those animations around a window. The pro...
[30 replies] Last: Thanks for the encouragement Zereo. I'll have a look at the article an... (by Bogeyman)
Merging FSTREAM & Files with .exe's
 
hey, i got a question yesterday i learned fstream, i made an login & password system with files. here is my code for : filesystemregister.cpp #pragma onc...
[1 reply] : I presume you are working only on Windows (because you are using .exe ... (by Duthomhas)
by Dazzer
struct - need a leeeetle help!
 
Hi folks, I'm working my way through the learncpp.com tutorials and it's going well. Now I'm on structs and i more or less understand them on a basic level. On...
[9 replies] Last: Depends what he/she means by "it". edit: I've been away from C++ too ... (by mutexe)
by davez
Need help with computation
 
Good day guys:D I need help with the computation because Im not sure if I got the correct formula heres the problem Flag Down The initial amount Increment ...
[no replies]
September 2015 Pages: 1... 3334353637... 42
  Archived months: [aug2015] [oct2015]

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