Beginners - April 2015 (Page 37)

by davidm
sort code
 
Write your question here. void mySwap(int arr ,int place) { int temp=arr ; arr =arr ; arr =temp; } void f(int arr ,int len) { int j; for(j=0;j<len;j++...
[1 reply] : Lets look at one thing first: void mySwap(int arr ,int place) { int ... (by keskiverto)
Trouble with classes (for experts only)
 
Design a class point that has x and y coordinates as data members: Include the following member functions: · Constructor with arguments · Constructor wi...
[3 replies] Last: Let's walk through the code starting at line 119. * You declare a rec... (by tscott8706)
Learning QT - Books?
 
Hello, I have tried to run a few searches for -QT Reference, or Leaning QT - but I don't exactly get what I'm looking for. I am big on reading and applying....
[1 reply] : Download Qt (it's Qt, not QT BTW :) ) and just get started. Make a sim... (by hyperfine)
Exception not thrown/caught
 
Hi, I have created exceptions: #include<stdexcept> #include<string> class CompteException: public std::runtime_error { public: CompteException(...
[8 replies] Last: Thank you very much, that solved it for me! (by BobMorane)
drawing problem
 
hi guys :) i have a simple problem that i wanted to draw a circle and i found a function that allows me to draw but when i draw any shape .. all what i get is ...
[3 replies] Last: Hia! I can give you an example of some code that draws a circle, hopef... (by ultifinitus)
Pushing words to a vector
 
Hello. This code is adding words to a vector. The only way to break it is to type "break". How to make it the user have to press enter instead? string word;...
[14 replies] Last: cin.ignore(100, '\n'); This would keep extracting characters from... (by Texan40)
by ye23
[Updated] Guessing game program advice
 
i have to make a guessing game with a maximum of 10 tries/guesses and also have to display the guesses for the user to see but im once again stuck after redoing...
[1 reply] : Please use code tags: [co de] Your code [/co de] Read this: http://w... (by coder777)
fstream
 
I was following a tutorial online and when I ran the program, it showed differently, as if it was reading from my code lines instead of the numbers.txt file. Th...
[1 reply] : Probably your application couldn't find the numbers.txt file. Check in... (by S G H)
Shell sort with an array of gap sequences
 
I'm trying to implement a shell sort using an array of gap sequences, and I'm having trouble getting the array to work with the shell sort code. It compiles, b...
[1 reply] : You're not using a.size() . Take a look at the Pseudocode: https://e... (by coder777)
class paramaters
 
Hello everyone, ive been working on this program for a bit trying to figure out how to properly use classes with paramaters, but with the code that i have belo...
[2 replies] Last: In your class definition, you only declared a prototype for default... (by bazetwo)
Classes
 
Design a class called Numbers that can be used to translate whole dollar amounts in the range 0 through 9999 into an English description of the number. Here'...
[1 reply] : So, do you have any questions? It looks like that void Numbers::prin... (by coder777)
Console trouble
 
I have a program that worked, however I made a modification but the program stops long before reaching the modified portion of the program. I suspect it has ...
[2 replies] Last: I'm on a phone so I can't post the code right now, but I can say that ... (by DarkLightHitomi)
if else statement using strings?
 
I'm trying to make string gender; cin >> gender; If ( gender == boy ) but I can't seem to get it to work. #include <iostream> #include <string> u...
[2 replies] Last: Don´t forget to close the case as solved ;) Have a nice day. (by patriic48)
Function call from class
 
I try to call a function that needs an argument and I can´t figure out what argument that is. Can anybody help? // Prg2.cpp : Defines the entry point f...
[2 replies] Last: Exactly, the problem when I take away the vector in class Konto { pub... (by patriic48)
Recursive Function Conundrum
 
Hi everyone, I'm a novice to the world of C++ and I've a logical question. I'm working on a code to test recursive function and wondering how the function ac...
[1 reply] : factorial(4) if (4 == 1) // No result = factorial(3) * 4 if ... (by Smac89)
overloading template<class T> operator>> for vector<T>
 
Hi, i want to ask for advice how this one thing could be done. I want to overload this operator template<class T> std::istream& operator>>(std::istream& is, v...
[6 replies] Last: @fg109 Are you sure that it's giving you an error for that line? I co... (by etrusks)
could somebody correct my code
 
Could somebody correct my code. it gives a error message when I verify stating expected unqualified ID before `{` token Thank you /* ##########################...
[2 replies] Last: Thank you very much for the reply. but I still couldn`t get it right (by isuru7777)
by ye23
Guessing the number program Advice
 
Have to make a Guessing Game Program and been stuck for a bit cant figure out my next step I have to give the user 10 tries/guesses to guess a random generated ...
[2 replies] Last: thx apperciate it but it turns out the code kept crashing for me so i ... (by ye23)
by savanh
question
 
hello, i hope u doing well all. I have this question compsition inshilizing by copy constructor ,but i dont know how to compelet it , i mean i wana u r help to ...
[2 replies] Last: [quote=savanh] compsition inshilizing by copy constructor I have no... (by ultifinitus)
error: expected primary-expression before } token
 
Write your question here. Hi, I'm having an error that I'm sure is a very easy fix, but I just cannot figure out how to fix it. I'm getting errors about expect...
[1 reply] : Ohi! You didn't declare the student object before calling student.r... (by ultifinitus)
April 2015 Pages: 1... 3536373839... 52
  Archived months: [mar2015] [may2015]

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