General C++ Programming - March 2019 (Page 9)

random number grid using matrix and for loop
 
Hello I am currently barely starting out with c++ and am stuck on the second part of an assignment that requires me to create a grid of randomly generated numbe...
[no replies]
by sev908
Char Array Augmented Grammar For LR0 Parser Question
 
Greetings, I am creating a program that will find the canonical LR0 sets for a given grammar. To start I have 2 char arrays, production, and production2. pro...
[6 replies] Last: Thenk you for pointing out the production 2 error. After talking to s... (by sev908)
Silly Problem with Pointer call by reference
 
Love Community, I have a Problem with Pointer transfere betwen Classes / Objects. I have a Class-A, this has as a public member a Pointer on a std:vector<Clas...
[1 reply] : Hate Dude, To fix your Problem with Pointer transfere simply use the x... (by dutch)
generating basic sequence number
 
i want to generate a number with n digits and all digits being same eg the number can be 22 88888 44444 3333 but this block of code #include <iostream> ...
[5 replies] Last: thankyou everyone , that was a compiler issue (by wowisay)
by GhooSe
crypto cod
 
Write a procedure that allows the user to input one positive integer and then outputs the difference of the closest higher and lower primes to itself, that is,...
[9 replies] Last: woww thank you bro (by GhooSe)
Undefined Reference in Polymorphism
 
I keep getting and undefined reference error when I implement my prototypes. I have the following classes Shape, Box, and Van as follows: class Shape { publi...
[1 reply] : ¿undefined reference to what? http://www.cplusplus.com/forum/general/... (by ne555)
NEED HELP!!! cstring
 
Can anyone help me to write a simple sample code about to read the file line by line and store it into cstring? The file contains few rows of sentences.THANK YO...
[4 replies] Last: This is clearly a homework assignment, and OP is asking us to do it fo... (by Duthomhas)
Why is isHodder() not working. What am I Missing?
 
I have this problem, A hodder number is one that is prime and is equal to 2j-1 for some j. For example, 31 is a hodder number because 31 is prime and is equal...
[12 replies] Last: I'm not sure if you have a question here. So, I'll just comment on th... (by doug4)
Nested for loop
 
Im trying to write a nested for loop that gets the data from an input file. The for loop will check the student and the 3 courses they are taking the 5 test fro...
[1 reply] : Double post: http://www.cplusplus.com/forum/beginner/250520/ (by Enoizat)
Stopping file input when a certain word is encountered
 
I'm working on a c++ program that is supposed to eventually be like history in google , i mad my self some fake address and a now i need to take certain word fr...
[1 reply] : just stop the loop. presumably you are reading in a loop, with a getl... (by jonnin)
by Hex213
function in parameter with return
 
Good afternoon, I need help with returning value from function. How can I save the return value to local variable ? I have problem with access to return value. ...
[8 replies] Last: thank you very much, I found two mistakes and I corrected them thanks ... (by Hex213)
Cannot insert variable into struct.
 
In header file I have struct like this: typedef struct module { struct module *module; struct mod *mod; DWORD Base, Size; ...
[7 replies] Last: Do you know what strcmp does? http://www.cplusplus.com/reference/cstr... (by doug4)
by elsa
Sorted List deleteItem & insertItem not working
 
Hello. My deleteItem and insertItem functions are not working: when you try to delete an item from the array it says "the item is not in the list"...and when yo...
[4 replies] Last: int SortedList::linearSearch(int item) { int location = 0; while ((... (by ne555)
by phoko
need insight
 
I have come across: "std::cout: or "std::cin" and others. Why not the simple: "cout" or "cin"? what special function does the prefix "std" perform? ...
[7 replies] Last: Thank you everyone, all was helpful. (by phoko)
simple merge
 
Write a function that merges two vectors, alternating elements from both vectors. If one vector is shorter than the other, then alternate as long as you can and...
[4 replies] Last: Thank you very much @Ganado big help, and I learned a lot, and sorry i... (by LucasArroyo)
VSFTPD not working with URLDownloadToFile
 
Hi, I'm using URLDownloadToFile function to download a file from FTP server: ftp://username:userpass@domain.com/test.file It works well with FileZilla ...
[1 reply] : nevermind with this piece of shit, i used proftpd and it works fine. (by AlreadyTaken)
Using variable as name for a variable in a class.
 
I looked into some other topics on here about using a variable as a variable name by doing for(int i=0;i<numP;i++){ // numP being the number of people ...
[10 replies] Last: Propos to you, Tikermothyn , for both having a brain and being polite... (by Duthomhas)
Need explanation to the function isVesuvian()
 
Hello guys, I have this question: A number n is vesuvian if it is the sum of two different pairs of squares. For example, 50 is vesuvian because 50 == 25 + 25 ...
[1 reply] : Why do you think the function works? Run it with a main that passes it... (by dutch)
March 2019 Pages: 1... 789
  Archived months: [feb2019] [apr2019]

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