Beginners - November 2018 (Page 7)

Funtion that multiplies every element of array type point
 
This is code for multiplying all array elements type Point with integer Vector Vector::Multiply_with_m(int m) { Vector v(this->dim); int i; for (i =...
[9 replies] Last: There's are errors: void Vector::Rotiraj_desno(Vector v) { int i;... (by kbw)
help in pair code
 
#include <iostream> using namespace std; main(){ int n; cin >>n; for(int i=1;n<=100;i++){ for(int k=1;n<=100;k--){ } } return 0; } So i wrote th...
[2 replies] Last: See this thread on the same topic: http://www.cplusplus.com/forum/begi... (by Satan)
Hello im just wondering how to do this?
 
I want to make a program that it can solve this a*x+b I just started so I don't know to do it can you please help me?
[8 replies] Last: y is a*x+b, the variable holding the output. MikeyBoy didn't write the... (by Satan)
how to convert char * to char []
 
how to convert char * to char ? I have some code that receives data , a char *, using the #include <WinSock2.h> receive function. i would like to convert t...
[2 replies] Last: You can copy the string literal into a non-const array, and then use t... (by MikeyBoy)
Function template, is it possible to constrain what parameters I can pass?
 
Hello, Often I need to define callable as a parameter for my function. I do it like this: template<typename MyCallback> void DoSomething(MyCallback...
[4 replies] Last: Mr. Borges, you help is invaluable as always. Thank you for your time ... (by Unspoken)
returning a local pointer
 
I have a question about returning a local pointer, does the folloing code violates the local pointer rule ? I found similar quetion, but the vector doesn't pop ...
[2 replies] Last: Actually I wouldn't return a reference (unless you absolutely have to)... (by coder777)
Header file error / Makefile.win
 
Good day people. I am new to OOP, so I asked a friend to give me a challenge. He gave me this question: The volume of a cylinder is calculated using the for...
[1 reply] : It's because your compiler doesn't know the path of your Cylinder.h fi... (by nuderobmonkey)
2d Vector help
 
Good day to you all, I have a the following program to do: Write a program that will have two user defined functions. One function will allow the user to enter...
[7 replies] Last: Looks fine to me. (by kbw)
How do I read this tutorial code line?
 
I'm having trouble reading one of the code examples from the Classes section of this website's tutorial pdf. My problem is on line 16: // pointer to classes ...
[5 replies] Last: CRectangle rect ; creates a two element array of class CRectangle on... (by closed account E0p9LyTq)
Undefined reference error? Rational class lab
 
Why does my code give me this error when I try to compile it? "/tmp/cciZVFen.o: In function `main': Lab6rational.cpp:(.text+0x22): undefined reference to `...
[1 reply] : You never defined the functions under the class.. how is the compiler ... (by Satan)
HW Help Can't Figure it out
 
This is a homework assignment for my class, and the professor didn't explain switch and two-way statements very well. Included is what I have so far, so please ...
[16 replies] Last: The sample code did not make much sense to me, I'm not trying to be a ... (by kcattgirl)
sizeof and how many bytes
 
Hello, I tried to do some experiment. The result are different and confused. Could anybody explain what and where do each line do. I saw the max number before i...
[3 replies] Last: ohh now I got it, thanks! (by soulworld05)
arrays
 
I have this problem that I am working on that i have to create an array of 10 random numbers and then display it, find the highest value, find the lowest value,...
[1 reply] : Hello mpj91bv, PLEASE ALWAYS USE CODE TAGS (the <> formatting butto... (by Handy Andy)
How to get size of a character
 
Hello. Currently, I am creating a game called Hangman. Whenever the program asks the user to pick a number, if he/she enters a character more than one letter, t...
[1 reply] : if you just need 1 character from the stream you can just throw away t... (by closed account SECMoG1T)
Need help with code
 
Hello everyone I am in need of assistance for this program that I am writing. When I run the program I receive 8 errors 4 of which are claiming lines 35,37,57, ...
[2 replies] Last: Thank you very much felt like bagging my head against the wall for som... (by nickp220)
C++_Templates_No1
 
#include <cstdlib> #include <iostream> #include <vector> using namespace std; class Complex { double mRe; double mIm; public: Complex(do...
[1 reply] : #include <iostream> class Complex { public: Complex (double re ... (by Enoizat)
too much cpu usage from my thread pool.
 
so i have written a command line utility program that scans a directory for files ["dat","txt",...] and use regex to find a search string in all searchable file...
[13 replies] Last: @kbw thank you very much for the suggestions, i'll definitely try that... (by closed account SECMoG1T)
by vysero
Unused method arguments
 
I will get straight to it. Let's say I have the following method deceleration: QString makeVersionString(const CVersionTag* firmwareTag, ...
[4 replies] Last: Is there a common method for documenting an overloaded method? For ins... (by vysero)
My array sorting isn't working
 
Hi, Arrays are a really weak area of mine. I have a program that opens text files(the files contain a simple list of words all lowercase in no particular order)...
[1 reply] : C-style arrays decay into pointers when they are passed to functions. ... (by Enoizat)
Tracing output confused at some points!
 
i am having some real difficulties in finding out the output in the following code i tried tracing it however i kept getting the wrong output at the second time...
[2 replies] Last: " // to the second (x) shouldnt it only accept (y)? Not sure what you ... (by truckboy98)
November 2018 Pages: 1... 56789... 24
  Archived months: [oct2018] [dec2018]

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