Beginners - October 2018 (Page 2)

My if statement is not going through
 
In this program i am trying to enter snack codes and reject codes that are greater or equal to 100. I first had cin as cin>> snack ; .It iterates 10 times but ...
[7 replies] Last: Oh no, I just wanted to blow your mind and that I have clearly failed ... (by Satan)
Receive message using boost::asio raw_socket
 
Hi! I need help in using raw_socket of boost asio. The goal is to transmit and receive messages using raw_socket. My current setup is that, I have separate c...
[8 replies] Last: Hi, it seems that the syntax for the buffer is now OK. Thank you for y... (by rookie000)
How do you make a new class
 
How do you make a new class in Zinjai? I cannot seem to find out how. It just says 'File>New project'
[5 replies] Last: I've downloaded the portable version for Windows. In that version, it ... (by Enoizat)
by JayGln
selection algorithm with vectors
 
Good afternoon, I am trying to do a sorting algorithm using vectors. I am trying to let the user input any number positive or negative. then once they enter an...
[7 replies] Last: give it a try. Vectors are virtually identical to arrays at their mo... (by jonnin)
Integrated sort with existing code
 
Hey, so I had this bubble sort method which I have tested and works, but I have to integrate it with another class. I don't understand why it's not actually sor...
[15 replies] Last: Please DON'T go back and remove your code from your original question.... (by MikeyBoy)
Abstract base class / derivation question?
 
I have an abstract base class. class A { public: virtual void message() const = 0; }; And I want to derive eight class's from this base class, b...
[2 replies] Last: Yes, an inheritance hierarchy is probably okay. In my opinion, 8 de... (by mbozzi)
by typinc
operator<< connat overload
 
So I am practicing CLASSES and here I have this "cannot overload functions distinguished by return type alone" underlining my "operator". How do solve this so I...
[6 replies] Last: In the header even <iosfwd> and <string> would be sufficient.... (by mbozzi)
Figuring out an issue with an output file
 
hello everyone. Ive been working on this program for a class and ive got it working for the most part but there is an issue with the output i cant quite figure ...
[3 replies] Last: Ah perfect that was a much better approach to the loop than what i had... (by Kukamunga)
Search won't work after sort in Array
 
My code works - It asks for 3 names and tel#'s then prints them in ascending order. It is next supposed to "ask for a name to search" but it stops after it prin...
[2 replies] Last: Wow, that was fast. Thank you. I like that "out of bounds" I guess, ha... (by khodgdon1)
Reading data into vector & finding middle item HELP
 
Hello, I am working on a code assignment that requires me to read data into a vector ( a website will input the data). Then, based on a vector's size, find t...
[2 replies] Last: I see. Thank you for catching my variable. I probably wont use the pus... (by Marcos8701)
Why wont my void reference function work in the for loop
 
Hi, I was wondering why the reference type was not printing out the information in the function AskFishShowers to the console. when every I run it just says"h...
[3 replies] Last: I would have thought you wanted to call Fillvectors from main, before ... (by Peter87)
Writing function data to an array
 
Hey guys! Our teacher wants us to create a factorial chart using recursion and I figured that part out already, but I am having trouble writing my function data...
[3 replies] Last: Yes our teacher says the data has to be stored in an array. These were... (by XboxOne2019)
by darego
Pointer to array, while loop on data
 
Hi there, I have some code that I would like to understand a bit better. I understand that 2 arrays (t1 and t2) are created, then 2 pointers (p1 and p2) to the...
[4 replies] Last: Thank you for all the very helpful replies! @tpb: I am not quite sure... (by darego)
Is there a way to use my existing function for something new?
 
This assignment was homework. It was creating a new alphabet to look like barbed wire fencing. The assignment was to loop the letters of the alphabet, the Arabi...
[1 reply] : Make a function where you loop through the input, which is sent in thi... (by Satan)
Filling and sorting an array
 
Writing an application that accepts 10 numbers and displays them in descending order. It almost works but it's outputting one junk number and 9 of my 10 input n...
[10 replies] Last: [quote=lastchance]and you will be quite lucky if it doesn't segfault. ... (by Ganado)
by Tduck
Why is my program outputting garbage here?
 
I write 1,2,3, etc, up to 24, and it outputs the 24 numbers fine, but then it outputs a load of garbage numbers like 37960 or a bunch of 0's. Why is the progra...
[5 replies] Last: [quote=Inspireftw]your program has no stop in it, so it doesn't know w... (by MikeyBoy)
C++ programming
 
Can someone help me out here? You will write a program that helps a player select players in Fantasy Premier League game. You have £100 to get 15 players, d...
[2 replies] Last: Do note that your posts will become much easier to read, if you do use... (by keskiverto)
by defs
number guessing game from pc side.
 
Hi there, can somebody explain this? In this game I do imagine a number and the pc is guessing. I can tell lower or higher or pc did win, if pc didn't find my ...
[9 replies] Last: mm i did wrong from the begining.. sorry for false topic. please rep... (by defs)
count digit afer decimal point (1,2,3)
 
How can i count digit after a decimal point. The value is supposed to be entered by user. I want to know how many values he added after decimal point so i can ...
[56 replies] Last: @Peter when you ran my demonstration program you got 23 right.. Yes,... (by Peter87)
by AL88
error # is not followed by a macro parameter
 
How can I get past this errer "# is not followed by a macro perimeter on line: #define ASSERT(x) \ I copied this straight out of my book can anyone sho...
[8 replies] Last: You didn't answer tpb's question: [quote=tpb]Do you know what "compil... (by MikeyBoy)
October 2018 Pages: 1234... 28
  Archived months: [sep2018] [nov2018]

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