Beginners - August 2019 (Page 7)

errors using default for switch statement c#
 
im trying to use default at the end of my switch statement and i keep getting errors! im getting frustrated please help im very new to programming and its qu...
[3 replies] Last: Ah, damn it. Thanks for the heads-up. -Albatross (by Albatross)
palindrome
 
This program takes a string as an input, and checks if is a palindrome. This is supposed to be case and space insensitive. Once I run it, the command prom...
[13 replies] Last: getline() in this form requires a string; variable answer is only a ... (by lastchance)
Help with ULAM
 
Hello judyotham, Thank you for using code tags. As I understand this class UlamProgram { public: String name; }; "name" is defined as a "pub...
[2 replies] Last: [quote=Handy Andy]As a public variable you could just as easily used a... (by coder777)
by RicoJ
Postfix ++ Overloading
 
Hi, I understand that in C++, the prefix ++ (++i) is default for the unary ++ operator. However, right now I am trying to implement i++ and I am not sure how t...
[3 replies] Last: Believe it or not, the place I have bookmarked for reference is Wikipe... (by Duthomhas)
by malugu
When stm32 is built based on firmware library version 3.5 project template, define problem in C/C++
 
There are two macro definition variables STM32F10X_HD, USE_STDPERIPH_DRIVER, is the first STM32F10X_HD the same as the startup file, choose LD, MD, HD according...
[2 replies] Last: Those macros are all used to configure the library to work properly on... (by Duthomhas)
I Have NO IDEA how this Line of Code Works
 
Hello, I am currently reading an article online about how virtual is implemented in C++ using a vtable. The author of the article provides an explanation by cre...
[8 replies] Last: Yes, you've cast the numeric value of the pointers into a type of inte... (by Niccolo)
Transfer of control bypasses initalization of variable with ifstream
 
Can anyone explain why this doesn't work? switch (level) { case Forest: const std::ifstream map("assets/forest.map"); break; case Desert: const std::ifstr...
[4 replies] Last: Thank you @dutch! That worked. I had no idea that one one could use ma... (by An Integer)
by kanken
Problems with high constraints
 
...
[6 replies] Last: It was probably the sore kanker. I like my "Reported" by some CC luse... (by salem c)
by Humpen
Question to structs and Memberinitialization
 
Hi everyone. I have read a codesnipet in a textbook, but i cannot imagine what it is doing. What does that mean: vector<Day> day {32}; 32 elements of day...
[2 replies] Last: Thanks for the link to the cpp-reference page. I now understand the co... (by Humpen)
finding min number in array
 
how to find the min value of an array? this method works perfect when finding the max number but if i change the if statement to < to get the min it throws me a...
[3 replies] Last: all good found solution i had to initialize my min and max value after... (by just4444)
by Carat1
FindWindow
 
i just had a few questions on how FindWindow function works. what does the 0 mean in FindWindow? what if i put a 1 instead? should it go on the left or right si...
[5 replies] Last: The difference(s) between, for example, FindWindow() , FindWindowA()... (by George P)
Templates & Overloading
 
In short, I took a month break of programming and forgot a large chunk of what I knew.. So here I am trying to review it before Fall semester begins. I'm curre...
[8 replies] Last: Albatross: Thank you for your reply. That was very informative. - ... (by PiggiesGoSqueal)
color and background color
 
Just wondering the best way to do font color and background color. Finished my class in c++, but I want to sharpen my skills, but I don't know what else to make...
[6 replies] Last: Hello Cjigsaw, If you are like me, you have finished what you were wo... (by Handy Andy)
by azsxd
card game
 
How do you create a game where two players each draw a card, where the card deck is created by an array?
[13 replies] Last: It's better to represent the suit and value as ... Best is what work... (by MikeStgt)
by lkdodd
Sort by Last Name
 
I am trying to sort a dynamically allocated array of structures alphabetically by last name. In order to do that I have to get the last name from the fullName c...
[3 replies] Last: Hello lkdodd, I do not know if using a character array is required or... (by Handy Andy)
initial value of reference to non-const must be an lvalue
 
I am trying to make Aimbot for one online game , but problem is it seems like I am not experienced enough.Soo I tired to take code of someone else and customize...
[6 replies] Last: @MikeBoy I know they are important and thanks I will definitely learn ... (by Jovanovic)
by lkdodd
Reading from Binary File to Structure Array
 
I am having trouble reading information from a binary file into a dynamically allocated array of structures. Later I will have to save the entire array back int...
[10 replies] Last: I have changed it so that instead of strings, I am using character arr... (by lkdodd)
Loading 3 lines using getline and cin(object prog., for, functions)
 
Hello. This is my first post on this forum. Pls let me know If i posted it on the wrong section. I am doing exercise in C++. Program suppose to load your name...
[3 replies] Last: Hello sosen88, What you would want is something like this: cout <<... (by Handy Andy)
by Ryan15
Loop to display ASCII characters
 
I would like to the output to look like: 54321A 4321B 321C 21D 1E but my loop keep printing A only #include <iostream> using namespace std; ...
[4 replies] Last: #include <iostream> #include <string> using namespace std; void patt... (by lastchance)
by lkdodd
Sorting an array of structures
 
The problem I am working on requires that the "Customer Records" be stored alphabetically by last name in an array of structures. I have tried using a Bubble So...
[7 replies] Last: That worked! Thank you so much!!! Sorry again for before! (by lkdodd)
August 2019 Pages: 1... 5678
  Archived months: [jul2019] [sep2019]

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