Beginners - April 2018 (Page 3)

Set_value functions in Structures
 
Hello, I'm currently studying Object Oriented Programming in University, and not doing as well as I'd like to. My question is regarding the "double set_v...
[3 replies] Last: You could create a var called tmp and return it from set_value. (by Thomas1965)
Pointer stepping loop points to number outside array.
 
The pointer loop that I made does not stay inside the loop when looking for the lowest number. The loop still points to the correct highest number though. The n...
[4 replies] Last: The assignment calls for me to use pointers to find the highest and lo... (by Jyggalag22)
by H13
Program not displaying area!
 
I'm new to programming! I'm trying to calculate the area of a rectangle with the length and width already passed as parameters (6, 4), but all my program does s...
[1 reply] : #include <iostream> using namespace std; double getArea(double leng... (by arczi w)
searching an array within an object array
 
Hi there! I'm working on this program that reads in info from a file containing, title, author (up to 4), publisher, isbn, price and the number of copies. This...
[1 reply] : Helli mdelellis, As I look at your code My first question is where di... (by Handy Andy)
What does "int ix = ( delta_x > 0 ) - ( delta_x < 0 )" do
 
Well, what does it do ? also, what is the modern pascal's equivalent ? I am trying to convert the Bresenham's Line Algorithm from C++ http://www.roguebasin.com...
[3 replies] Last: well, that's interesting, thanks for the help, the second program you ... (by Flaze07)
by Mykel
Filling array with words from text file and finding similar ones and sorting them out
 
Hello everyone, First of all sorry for my poor English skills and I'm new to C++ too so don't judge me too much and I would appreciate if someone could try t...
[6 replies] Last: Hello Mykel, @ne555 Thanks for the tips. I liked the front and back. ... (by Handy Andy)
Survival game OOP
 
My question is about OOP. I have to create a survival game which contains 3 different types of agents and 3 different types of items. Each one of them has a par...
[no replies]
by nearc
Read File and Selection Sort
 
Hi, I need to read a file with a name data.txt instead of array in this code. This is selection sort. Can you tell me if its gonna sort 100,000 elements fine? ...
[1 reply] : O(n^2) is going to take a long time for 100e3 elements however, for(i... (by ne555)
Circular dependencies/references
 
Hi guys I am following a tutorial http://www.learncpp.com/cpp-tutorial/15-7-circular-dependency-issues-with-stdshared_ptr-and-stdweak_ptr/ on circular reference...
[4 replies] Last: ======== ========= | Person |- - - >| Person | | object |... (by Peter87)
by Minxx
program doesnt process all vector values
 
Hello everybody, Thanks for taking a minute to read this. Below is code that should enable the user to put in values. These values should then be stored into...
[8 replies] Last: Yes, I need only the last (correct) loop to be displayed. I tried movi... (by Minxx)
HELP!
 
Hello everyone, I have this working program with operations on circular doubly linked list. But I have one slight problem, for example when there is only one no...
[10 replies] Last: Duplicated question: http://www.cplusplus.com/forum/general/235707/ (by Enoizat)
by Grak
C++ replying to a QFrame signal origin
 
Hi, so I'm dealing with a slight wall I met in my coding project. I'm making a card game from a pre-written code using QFrame, and at this point I'm trying ...
[2 replies] Last: This works, awesome! For some reason, I'm now getting a SIGSEV, segme... (by Grak)
Three-Dimensional Array Assignment
 
I'm wondering why I'm not allowed to do this simple assignment: int n=9,m=9,i,j,g; int v ; int d ; [...] v =d ; i,j and g have adequate values ...
[10 replies] Last: Yes, but I want to do it automatically (by ryochan)
Array
 
I made a code that asks "write a C++ program that declares an array alpha of 50 components of type double. Initialize the array so that the first 25 components ...
[1 reply] : Pattern: if \(\(.* \+ 1\) % 10 == 0\) The . means "any character".... (by keskiverto)
pointers and arrays questions
 
I'm wondering how I can calculate the average but instead of calculating all the numbers in the array, the first one is dropped. Then the second and so fourth. ...
[1 reply] : One way is to pass the second elem of your array to the average functi... (by Thomas1965)
Swapping do while loop
 
Hi, what's the best way to remove the do/while loop and just have it go once? It's looping nonstop so the program is never ending and it's not supposed to do th...
[3 replies] Last: Here describe coding for an integer number is not true cin >> number; ... (by shivkumar12)
Creating Windows Application first time
 
Creating Windows Application first time I have a few questions, I'm currently trying to create a windows application that can copy and paste a string of char...
[5 replies] Last: I can vouch for WPF, it was very convenient to use when I was making s... (by Ganado)
Sorting Code
 
Hi all, I'm having problem getting my code to work. I am trying to do a selection sort algorithm. I am required to sort a vector and give the maximum and minim...
[7 replies] Last: Icy- Ah I see now. The chart really helped. I didn't divide up the siz... (by angchan)
Next Prime Number Function C++
 
Hello Hello ! -I want a function which show me the first prime number after I press a regular int number. 1.For exemple I type 14 (N=14) then to show me the ...
[3 replies] Last: Thank you soo much guys....someone from other post solved me....Wish y... (by WalterCC)
by emma21
Transposition Cypher
 
This is the description for my computer science project: For this transposition cypher you will separate the string into two different groups. The first group ...
[3 replies] Last: are you allowed to use actual C++ classes like std::string? Just tons... (by icy1)
April 2018 Pages: 12345... 25
  Archived months: [mar2018] [may2018]

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