Beginners - March 2014 (Page 48)

How do i get a std::shared_ptr from "this"
 
Hi, i would like to know if it`s possible to get a std::shared_ptr from "this". Let`s asume the following code, using standard-pointer: void Abstrac...
[2 replies] Last: Thank you! This helped a lot and it works fine! Btw: after i posted m... (by Matze74)
NEED HELP
 
Okay. So I am sorta intermediate to the world of C++ and I am working on my first text based video game. But I keep getting these errors when everything seems f...
[4 replies] Last: @MiiNiPaa Okay, so I have finally got it to work but I can't test out ... (by FrankMcDonald)
Loop sentient value help
 
I have did a code for school lately and feel most things are correct but after it will correctly run and do all functions it won't end the loop. Any help with m...
[5 replies] Last: ( (yw!=0) || (yw<0) || (yw<99) ) is always true. yw!=0 is true for ... (by dhayden)
I really need help ! C++
 
How can I solve these. I didn't get it at all. http://www.7fth.com/img/139475073321.jpg
[7 replies] Last: I tried to do the first problem, there is an error but, I don't know w... (by Meme123)
Invalid conversion from "const char*" to "char"
 
Hey Guys! I just tried a little classes and object stuff and came over an error which I can't really figure out - mybe I'm too tired already or just not experi...
[1 reply] : "X" is a string (const char*). It has two characters: 'X' and '\... (by Stewbond)
C++ Boolean question
 
Lets say i have the following data of a double array P[ ]. And length of array P[ ] is L. The smallest element in array P[ ] is E. How can i make use of th...
[1 reply] : Have a temp int variable set to the first value of the array and anoth... (by Stormboy)
BubbleSort Complexity
 
I'm a little confused. I know that the complexity of BubbleSort is (n(n+1))/2 , but my question is: Suppose I have an array, I understand how passes work - b...
[11 replies] Last: nvm, i figured it out. (by shamieh)
by phocus
Help understanding a piece of code
 
Hi guys, So I was looking up code for a Vignere Cipher and I found this: http://www.sysnative.com/forums/programming/7366-vigenere-cipher-encode-decode-me...
[3 replies] Last: Please do not delete your posts. It prevents other users with similar ... (by MiiNiPaa)
by Alby94
std::move
 
Why I cannot move native types with std :: move? Ex. int a = 5; int i = std::move(a); /*/ a retains the value 5 /*/ std::string b = "hello"; std::st...
[3 replies] Last: [quote=Smac89]moved, they are copied. They are moved. It is just they ... (by MiiNiPaa)
How do you calculate maximum value of bit values?
 
i dont know if i asked correctly but . . . i want to ask how do you know the maximum value for example for 1 byte.. 1 byte = 1111 1111 or = 255 1 nibble = 1111...
[5 replies] Last: 1275 requires log2(1275) ≈ 10.3163 — 11 bits or rounded up - 2 byt... (by MiiNiPaa)
The use of delete
 
Hello I'm doing a program which use the memory dynamic , but i have a problem to use delete I'm going to show you a part of my code void Bibliotheque::...
[5 replies] Last: Another way vector <Exemplaire> list; list.push_back(Exemplaire(test... (by ne555)
need help with discount code??
 
i am supposed to create a code that a user can input the number of an item and will get the total. the number of items ordered determines the pricing they wil...
[8 replies] Last: i am not doubting your skill by any means i am just trying to figure ... (by Codermik)
PLEASE HELP HAVING ISSUES WITH A EXERCISE
 
The tax payable on taxable incomes for employees in a certain country is set out in the following table: 0 – $18,200 Nil $18,201 – $37,000 19c for each...
[4 replies] Last: You are correct Softrix. The then was meant to be commented out and te... (by unsensible)
by enemy
"invalid conversion from 'char (*)()' to 'char'" ???
 
Hello! Please, what means actually char(*)() ??? What conversion do they think about? Please, if someone knows the answer!!! MANY THANKS!!! #includ...
[3 replies] Last: But, what in the program was that complier ment with the expression c... (by MikeyBoy)
to print out an array
 
Im trying to print out a simple array such as P ={1,2,3,4,4,1,2} why do i get this weird output -> 0x28fec8 instead? can anyone advise what is wrong with my c...
[1 reply] : What you're printing is the memory address of the array and not the va... (by unsensible)
by Ch1156
what does this mean and how would i write it in C++
 
Ok so i'm learning SDL and I came across this line of code from Lazyfoos website: printf( "SDL could not initialize! SDL_Error: %s\n", SDL_GetError() ); ...
[1 reply] : std::cout << "SDL could not initialize! SDL_Error: " << SDL_GetError... (by MiiNiPaa)
How many bits are in these type?
 
These are two literals: "a" L"a" I think the first is a string literal that has 8 bits. It's really "a\0". The second is wchar_t string literal and...
[1 reply] : Characters are guaranteed to be 1 byte each, so, the first string is 2... (by S G H)
by enemy
line with cout countaining text and function-is execution SPLIT???
 
Hello! Sorry for bothering, but this doesn't let me sleep in piece! In this code: #include<iostream> using namespace std; int* po(int b){ int d...
[4 replies] Last: So, it means, it just depends on compiler, what he woudl respect as a ... (by enemy)
by Huppa
I need major help with For Loops
 
I'm having troubles with for loops, I'm completely new to them and very confused. How do I do this for loop correctly? If there's anything else wrong with my co...
[1 reply] : A for loop will not work in this situation because you don't know how ... (by unsensible)
by enemy
dYNAMIC MEMORY- need help!!!
 
Hello! Please, let's go from the beginning!!! int* po(int b){ int d1; d1=3*b; int d2; d2=d1+5; int d3; d3=d2+3; int* a=new int ;...
[5 replies] Last: http://www.cplusplus.com/forum/beginner/126047/ (by enemy)
March 2014 Pages: 1... 4647484950... 79
  Archived months: [feb2014] [apr2014]

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