Beginners - April 2015 (Page 38)

Program returns garbage value
 
I understand that since the value requested isn't found, there is no "id" available for it, so the compiler just assigns it a garbage value. Now how do I thro...
[1 reply] : Perhaps the question you want to ask doesn't really have to do with ex... (by ultifinitus)
by mi6aka
bool function return
 
hey guys, I am trying to write a function which compares 2 arrays of characters. At the end it only return true. Please help. Here is the whole code; #i...
[2 replies] Last: Glad you figured it out! Looks to me like you included your else state... (by ultifinitus)
cout not declared?
 
I'm teaching myself and bought a c++ compiler and I can't figure out why this cout is not declared. Int main ( ) { Int a = 5; Int b = 3; If ( a > b ) { Cout ...
[7 replies] Last: Things can get pretty messed up. The first two answers do a pretty goo... (by closed account 2LzbRXSz)
Deallocating Pointers with Arrays
 
I need to deallocate arrayPtr in my addNumber function. I know I'm supposed to use delete to somehow deallocate it, but when I run my program it removes 10 from...
[6 replies] Last: ultifinitus Thanks for the explanation. It makes a lot more sense now... (by misskmarie)
Function call from a class
 
Write your question here. Whn i call this function in Bankaccounts.cpp - file from my main nothing happens. The compiler doesn´t show any errors. Can anybod...
[2 replies] Last: Thank you very much Peter87 - That solved my problem, I really appreci... (by patriic48)
Using pointers?
 
Hello. I'm trying to get into pointers. Let's say this was real program. //... else if (mood == "drunk") { const double tip = bill*0.15; const dou...
[6 replies] Last: Yes. (by TarikNeaj)
Bulls and Cows
 
Hi everyone, I was asked to write a Bulls and Cows game for homework and I've done the most. But couldn't get to some points, could you help fill in a few blank...
[2 replies] Last: This is my code for this exercise but using letters This was more comp... (by etrusks)
by eastw
How To Calculate Frequency In An array
 
Assume the array has [0 0 1 1 1 0 0 0 0 1 1 0 1 1 1] I would like to store 1's that has been repeated. As the example above, I would like to store 111 into a...
[1 reply] : Why u dont try something like this?: arr = [0 0 1 1 1 0 0 0 0 1 1 0... (by EdevanX)
Please correct Program
 
When is Wrong in my program please cerrect it . #include <iostream> #include <string.h> using namespace std; void ten(int n); main() { cout<...
[3 replies] Last: This code works, don´t forget to comment your code in the future. #... (by patriic48)
by Cobey
save value as Pointer address
 
Good Night/Morning CplusCplus int i = 123456; how can save Value i as address. Like: printf("Address:= %08X\n", i);
[3 replies] Last: stringstream http://www.cplusplus.com/reference/sstream/stringstrea... (by Cobey)
strstr() overloading?
 
solved.
[3 replies] Last: What do you expect to happen, if you do: const char * foo = "Hello"; ... (by keskiverto)
Random Number Guessing
 
I'm pretty new to coding so please excuse me if these are dumb questions. This code needs to prompt the user to enter the highest positive integer from a range ...
[13 replies] Last: You continue to define your function within int main(); I suggest you... (by germanchocolate)
Converting string to hex
 
Hello. I need to convert string of decimal number to hex. I need the string to remain string (or at least the output to be string). What's the easiest way to do...
[7 replies] Last: Thank you all. I'd be grateful if someone link me some good sources of... (by mighty asker)
Passing Parameters As Pointers?
 
This is my code that I have so far and I am not entirely sure what I am doing, I need some help please? This is What I am suppose to have done. Wri...
[5 replies] Last: You mean this? http://www.learncpp.com/cpp-tutorial/78-function-point... (by fg109)
Pyramidal display
 
I need to get the zeros in this array to display as a pyramid. I've already set it up to where just the zeros display, and it has to be in a 2D array because th...
[1 reply] : if (np == -1) cout << ' '; else cout << setw(2) << '0'; ... (by fg109)
Array as a Pyramid
 
Write your question here.
[2 replies] Last: Ignore this post, I guess the question posted twice, once blank. (by confusedengstudent)
Destructors being called twice in inheritance
 
: Problem solved. It is due to that I didn't put the copy constructor and also the function of copy list I found this same question a lot over the net none ...
[5 replies] Last: We can clearly see that the OrderedLinkedList has no data members of i... (by keskiverto)
by Lee125
Stack,queue and string.
 
Can I know should we use array to store the number or words. Is that wrong when we use array?
[1 reply] : No, it's not wrong. Arrays have some advantages (no runtime memory all... (by Gamer2015)
by pik
selection sorting pointers
 
Hello. I had written a program where 10 numbers are infiled and placed on a linked list. They are then sorted using selection sort. I sorted the values not the...
[1 reply] : What do you mean by "sort pointers"? Is it that you don't want to swa... (by keskiverto)
How to create simple gui in c++?
 
I use SFML but it seems like I can't for the life of me create a decent menu/gui with it. Is there some high-level thing I can use with sfml/c++ to create my (i...
[1 reply] : Qt provides a large API and a GUI-Designer As you can probably imagin... (by Gamer2015)
April 2015 Pages: 1... 3637383940... 52
  Archived months: [mar2015] [may2015]

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