Beginners - January 2018 (Page 18)

by quiz
merge sort text file
 
Hello. My problem is that I have to implement a sorting algorithm by merging with text files, in the input file (to be sorted) each number is on a separate line...
[no replies]
System call with multiple variables
 
Hello, I'm trying to make a system call using values from external file. Using mostly C not C++ because using the code on RB PI, with Arduino shield for other p...
[no replies]
by zingob
problem with typedef
 
Hi there, in a simple test program I am using typedef to keep things simple, but when I replace the typedef names with the longer original declaration I get err...
[2 replies] Last: hello helios.. thanks! wow what a mistake.. ahah.. After I wrote the ... (by zingob)
Reading from a file.
 
Hey everyone, I'm working on a project where student issues a book. when withdrawing a book he gives data that contains his name, ID, department name ...
[5 replies] Last: @Handy Andy Thank you for opening a path for... (by Hassibayub)
use of while loop with flag control varible
 
this piece of code is running infinty. i am not able to get why is this happening. //flag controlled while loop //number guessing game #include<iostream> #in...
[6 replies] Last: thanks. (by adlice8700)
Problem with showing net salary
 
Pretty much trying to figure out the net salary but it wont show when i try to enter number.. Example: enter basic pay: 35050 net sal: #include<iostrea...
[1 reply] : I am assuming the variable net is the net salary. If so, then line 3... (by chicofeo)
Insecure array size!
 
Why does ARRAY_SIZE work only in 'main' and not in 'printarray'? #include <iostream> #define ARRAY_SIZE(array) ((sizeof(array))/sizeof(array )) //array s...
[2 replies] Last: To clarify, the word usually used is that an array decays in to a po... (by Ganado)
by flav32
program effciency
 
Hi there:) I had to create an array that can hold ten integers, and get input from user. Then I had to ask the user for an integer, search for that integer and ...
[7 replies] Last: If you have something new to say, there's no harm in creating another ... (by mbozzi)
Which symbols is the "unresolved external symbol"?
 
I'm working on a program to take in an object with a name(string) and a number(double),put them into an array of objects, sort the objects by the number, and th...
[9 replies] Last: Hi, can you show your new code? Edit: Look in the tutorial top Left ... (by TheIdeasMan)
getting a 2d array with pointer
 
I'm new to using pointers and I have a problem. I must get a 2D array of characters from the user and the user is giving me the number of rows and columns and w...
[1 reply] : I must get a 2D array of characters from the user Then why do you ... (by Chervil)
by flav32
position of lowest and highest values of array
 
I have to find the position of the lowest and highest values of an array.The array starts at 0.For example: INPUT:5 8 7 9 2 5 OUTPUT: 4 3 #includ...
[4 replies] Last: omg I can't believe I missed that! Thank you so much!!! (by flav32)
Undefined reference to operator >>
 
Hi everyone, Im writing 2 classes. I have tested class Person. It is fine. Then I write class Company which use Person as part of it. But Im encountering on ...
[1 reply] : Oh silly me! I define operator<<(std::ostream&, Person const&) in my ... (by jessicax1028)
Runtime polymorphism
 
I'm trying to achieve run time polymorphism however i am not quite sure how it's done. Is the code example down a good way to do it or not? Will using it become...
[8 replies] Last: [quote=globaltourist]why is it considered dynamic polymorphism if the ... (by Cubbi)
by imren
how to write the avreage velocity to the screen.
 
A file called speed.txt contains 9 time (h) vs speed (km/h) measurements of a car.Write a program to read data into a arrays and output the avreage velocity t...
[6 replies] Last: thank you so much (by imren)
Random Number/ variables
 
I dont have any code yet, just a general question. I'm working on an assignment that will generate random numbers, then do things like doubling that number, rev...
[5 replies] Last: substr gives you a string . If you want a char you can use the subscr... (by Peter87)
warning: left shift count >= width of type
 
I am getting this error whenever i am trying to compile the program. #include<iostream> using namespace std; void printstars(int blanks,int starsinline);...
[6 replies] Last: thanks to all of you,for helpint me. (by adlice8700)
AM PM Military time
 
Ive been working on this for hours now, have around a million errors, was hoping for some pointers. The problem is "Write a program to convert the time from 24-...
[7 replies] Last: I'm starting to understand the true value of pseudocode. Thanks, dhayd... (by danpbrown1973)
by umayr
If statement issue
 
Hello, I am trying to make a little program where you have to guess the number the computer is thinking of. However, at the if statement it showing me an error,...
[2 replies] Last: Thanks a ton man! (by umayr)
by imren
class question helping please!
 
In the x-y plane, the general equation of a circle of radius r is given by: (x - a)2 + (y - b)2 = r2. Implement a Circle class. Each object of this class will ...
[1 reply] : Look at sum: (x - a)2 + (y - b)2 The point (a,b) is the center of a ... (by keskiverto)
order of yaw pitch roll
 
I have a 3d camera in a 3d world where I have ability to rotate a point about an arbitrary line. So I guess I want to give the camera a default center position ...
[4 replies] Last: I think if you fudge to skip the anomaly (just insert if blah == 0 the... (by jonnin)
January 2018 Pages: 1... 1617181920... 22
  Archived months: [dec2017] [feb2018]

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