Beginners - April 2015 (Page 17)

by Gohmer
Arrays multiples
 
13213
[no replies]
c char* to int(with 0)
 
Write your question here. int x= 0x00123ABC//RESULT IS 1194684 //CHAR EXAMPLE char *c="0x00123ABC" How can i convert a char* to int so i c...
[1 reply] : Got it. As soon as i changed my google search from "char to int c" to ... (by azzclown)
Help needed for Basic Calculator
 
I need help with this. I am brand new to coding and I am trying to make a calculator but it keeps infinitely looping after it asks to if you want to make anothe...
[4 replies] Last: The way you check whether you should continue or not is wrong: if (z ... (by TheHardew)
Overloading operators
 
Hi I am studying Overloading Operators at class2. Even after I read explanation, I still don't understand the things like 'operator + (const CVector&)' why does...
[2 replies] Last: That is not "canonical" op+. It is more natural to have op+ as a non-... (by keskiverto)
by Lee125
Function not working.
 
Can I know why my diplayItem didn't work? #include<iostream> using namespace std; class box { public: void open(); void removeItem(); v...
[2 replies] Last: You didn't pass it any argument. When you declare it as: function(int... (by TheHardew)
Implementing a menu class: is it possible and how do I do it?
 
Hi everyone, Basically, I'm looking to create a class that allows me to set up multiple menus. As it is now, my code uses several functions like the followin...
[2 replies] Last: You cannot declare functions in other functions, only in global scope,... (by TheHardew)
by Lee125
Private and public.
 
Can anyone explain why we must declare public and private in struct? example coding class box { public: void open(); void removeItem(); vo...
[2 replies] Last: Encapsulation. You put money into your wallet. You go to shop. You ... (by keskiverto)
Code stops when calculating change using functions
 
I was to write a code to calculate the total meal for a customer and then give them the total number of 20s, 10s, 5s, 1s, quarters, dimes, nickels, and pennies....
[1 reply] : Please use code tags when posting code. Next you should be getting se... (by jlb)
Recursive issue
 
I have a recursive maze problem here but it marks everything that has a '.' in the matrix as an 'x'. I need it to mark it with '+' when it is part of the path a...
[10 replies] Last: ohhhhh, my bad......Just trying something alittle different.......I l... (by ZeroSploit)
declaring strlen
 
hello i have some difficulties declaring strlen, im new to programming. #include <iostream> #include<string> using namespace std; int main() { ...
[3 replies] Last: @abstractionanon oh i forgot the c in the header, and thanks. @jlb my... (by seema96)
by Lee125
Different between class,header,source,template?
 
Can I know what is Different between class,header,source,template? When we should use each type. I try search but did not tells about that. best regard.
[1 reply] : Did some googling and found a few definitions. Class Classes are a... (by CLman94)
Bigint Mulitplication
 
Here I've got a bigint calculator that uses a safearray class(not shown) to store large numbers and do arithmetic operations on them. I've got add and subtract ...
[no replies]
sum of the numbers
 
#include<iostream> using namespace std; int main() { //1+2+3+4+<=10 // 1+2+3+4+5+6<=21 int sum=0,num,a; cout<<"enter a number: "; cin>>num; for(a=...
[3 replies] Last: #include<iostream> // #include<string> using namespace std; int main(... (by ZeroSploit)
by Lee125
Class
 
Can anyone help this example I try but it cannot run. I dont know what is wrong. #include<iostream> #include "box.h" using namespace std; int main...
[5 replies] Last: This error message. 'class box' has no member named 'removeItem' box.c... (by Lee125)
Switch not execute commands(&& crosses initialization)
 
Hi! I meet problems with Switch statement... Because when I try to execute some code in main it's run correctly, but when I put it in a case of switch statemen...
[6 replies] Last: 1)Why my code don't have "a decente identation style"? O.o I leave bac... (by Ray Soy)
Creating a BlackJack game.....
 
Write your question here. In curiosity, how could I go about creating a blackjack game with standard house rules without using objects/classes. As I dont seek a...
[12 replies] Last: @whitenite My lecture said we were going to write a game in c++ but i... (by Styles Kelvin)
by Gi Pa
Local vector
 
Hi to everyone, I've to do the following exercise, Given a global vector gv, I have to define a function f() which takes a vector as argument, such that: 1)Insi...
[3 replies] Last: You haven't finished all of the assignment yet, so I'm not sure what y... (by LB)
ordered doubly linked list
 
this code insert elements in doubly linked list in ascending order but when i try to insert element in between or bigger than those exist the program stops wor...
[3 replies] Last: I don't think that you're understanding what I'm saying. node *K; ... (by fg109)
[UPDATED] Logical error happened.
 
I am a beginner and i'm quite confuse to produce the output as the image link below, especially the loop (although the output of the following code is the same ...
[2 replies] Last: @whitenite1 Thank you so much Mr. White. Main problem fixed. I will t... (by jackiettw)
by enemy
Online exampel not working- tempalte function
 
Hello, found that example on net and it does nto work, says should be int main instead of void???//codepad #include <iostream> using namespace std ; //m...
[1 reply] : main should always return type int. (by AbstractionAnon)
April 2015 Pages: 1... 1516171819... 52
  Archived months: [mar2015] [may2015]

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