Beginners - November 2013 (Page 27)

This should work!
 
I can not figure out why this code compiles but doesn't display what I expect! I thought it would show me five random card picked form the deck. #include ...
[6 replies] Last: sanddy1911 was correct.on line 104 (by zhongcheng)
Help For Arrow Keys
 
Hey, I'm trying to build a Console RPG thats responds in realtime To The Arrow Keys the user enters. This way I wont have to wait for the user to press "enter...
[no replies]
Static block usage
 
Hello I'm beginner in cpp programming. I'm confused about static block usage in cpp code so should any one explain about usage of static block. Tha...
[1 reply] : Static block? Do you mean static variables or static functions? stat... (by Catfish666)
Help with function returning wrong value
 
I'm currently taking a programming logic and design class and we're using C++ for our homework. I'm still a very fresh beginner - having trouble with assignmen...
[3 replies] Last: Thank you! I've made the changes you suggested and it worked! But fo... (by SME ACC)
Insert in 2D vector of classes
 
Dears, Im using Class called Transaction and I need to create/initializa 2D vector from this class and Insert into it the objects. Kindly advice // ins...
[4 replies] Last: http://www.cplusplus.com/forum/beginner/12409/ (by mutexe)
by jjyk
Prime number using classes
 
Hello. I'm trying to write a program that finds the prime numbers from 3 to 100 while using a class--and having the array of numbers in the private member of th...
[11 replies] Last: @sandy but I think the array is a requirement for the assignment wh... (by mutexe)
by riju16
Stuck to understand output..
 
iam new to C++..i was reading C primer plus..where i got stuck in one part..i dont understand how o/p came as mentioned in the book. unsigned u = 10; int...
[6 replies] Last: There is a rule if there is one unsigned and another is signed int tha... (by sanddy1911)
Linear search
 
Please tell me what's wrong with this linear search algo! #include <iostream> using namespace std; int searchlist(); int arrsize = 5; int array = {...
[2 replies] Last: Oh yes. Got it. Thank you :) Will keep the hashtags in mind. (by peaceormetal)
Repeating the program?
 
I'm working on a madlib program for my class, and I'm trying to code a specific part of the program which will basically repeat the entire program depending on ...
[2 replies] Last: Mutually recursive: #include <iostream> #include <string> std::strin... (by JLBorges)
Memory exception error in Strings
 
Hi, I am trying to retrieve data from the CSV file. I am creating linked list to copy that data. temp = (Signal_Config*)malloc(sizeof(Signal_Config)); // alloc...
[1 reply] : Did you try using new , which is the C++ way of allocating memory, ra... (by Chervil)
by enemy
Comparing numbers to c
 
Please, why I get numbers which are not array values? Many thanks! #include<iostream> using namespace std; int main(){ int c=40; int array_...
[3 replies] Last: Loop on line 22 iterates the case j==4. => Condition on line 26 will a... (by keskiverto)
C++ Auto Timing
 
Hey guys, can someone help me with a function subprogram or a set of statements that allow me to do something within a time limit. I want to create a self-regu...
[7 replies] Last: You can use the C++11 <thread> if you're compiler supports that. http... (by Mats)
infinite loop problem!
 
I have an assignment in my C++ class and the code I wrote keeps running as an infinite loop. I don't know what I did wrong. Any help is appreciated. adding a ...
[2 replies] Last: Alternatively you could use a "break" statement (by nutty craze)
Simple Calculator
 
Hey all (Small logical error?), I am supposed to design a Calculator on C++ that works like an actual calculator(starts with 0 and values keyed in are added ...
[3 replies] Last: still cant work Yes, you really need to improve your sense of logic. ... (by coder777)
Idea please
 
/* Shown below is an Floyd's triangle*/ 1 2 3 4 5 6 7 8 9 10 11 .... 15 .. .. 79 ......... 91 /* Give me the idea to generate this, thankq */ ...
[4 replies] Last: I solved this but with little bit odd way. Ok, I didn't elaborate ful... (by coder777)
How can I group multiple variables into a single variable?
 
for example I want all of these to fall into a new variable "salaries". double analyst = 49888.25, teamLead = 65756.85, manager = 99852;
[3 replies] Last: http://www.cplusplus.com/doc/tutorial/structures/ http://www.cplusplus... (by mutexe)
by nvrmnd
expected '(' before '.' token ( arrr!!!! )
 
i see no reason why the compiler keep complaining at line 23 in the initialization list : class window { public : /** * @brief */ //window(...
[4 replies] Last: thanks for the new knowledge JLBorges !! (by nvrmnd)
by enemy
writes right for 400 but not for 484...
 
Helo! Please, what is wrong wiht the code? If I out a1=400, it writes out 19, a si t should be. But, if I write 484, then it writes out NOTHING!!! it should wi...
[5 replies] Last: Did U try this program in your own compiler?? (by enemy)
encoding game help!
 
#include <iostream> #include <cstdlib> #include <string> using namespace std; class Encoding { private: string coding_words; int shift; int wlen; ...
[no replies]
calling functions with arrays
 
Getting an error under the main function by int car_list . I'm aware its incomplete type and I have no specified the size of the array. But I want to call that ...
[11 replies] Last: Makes much more sense now! Thanks Shadow Fiend (by fahmankhan75)
November 2013 Pages: 1... 2526272829... 80
  Archived months: [oct2013] [dec2013]

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