General C++ Programming - September 2017 (Page 2)

Struggling with a program
 
Just wondering if anyone here could help me coding this. I am a rookie in C ++, just started learning it about a week ago. HAALP! Write a program (filename sor...
[1 reply] : Review your class notes; those will help you best. Look at online tuto... (by Duthomhas)
Problems with spaces in the char variable
 
I want to encrypt spaces but a weird bug is taking place -if you only input spaces, the default condition is used in the switch statement. -if you type let's ...
[5 replies] Last: Right, I'll fix that. Thanks again dude! (by JoJoTag)
Display an array
 
Thanks
[1 reply] : Your current loop starts at size - 2 and finishes at zero, subtractin... (by Repeater)
How do I update the maze?
 
Hi in my algorithms class we are creating a 2D pathfinding maze where we read in the maze from a text file, and that asks the user to input where exactly they w...
[3 replies] Last: Well, basically you just have to move the entiry loop from line 45 int... (by coder777)
by rimun
How do I detect if the user enter a number only or number and words?
 
I got an assignment where it's optional requirements require me to convert x(real number) from degree to radian if the user's input has the word 'degree' append...
[5 replies] Last: What if the user enters something like sin 30 radian degree ? ... (by Chervil)
Array of Pointer
 
Suppose we define const char *names[ ] = { "akshay", "parag", "raman", "srinivas", "gopal", "rajesh" } ; In this declaration names[ ] is an array of pointer...
[7 replies] Last: Very good point. Someone has to polish the reference here. Note sent. (by keskiverto)
Beginner Question
 
Hey so im new at c++...i'm not too sure on how to make a program where the user inputs a number and the number is added by a another fixed number.. lets say 2....
[4 replies] Last: ... and loops are explained at: http://www.cplusplus.com/doc/tutorial... (by keskiverto)
Problems with nested if else loop
 
Hi, I'm a newbie learning C++ on my own So far I've traveled to this if else nested loop topic I've even created a program on my own But it seems to have an e...
[4 replies] Last: Thanks for editing and putting your code into tags - it looks much bet... (by MikeyBoy)
Help fixing code please (aligning numbers)
 
I need help aligning my data, so far i'm getting everything lined up its just in my hyperbolic functions instead of .01 it will show .0100000000, how do i adjus...
[1 reply] : @JarJarz, please do not start a new thread on the same topic. It negat... (by lastchance)
Pattern printing beginner [help]
 
What other codes must I know to have "void print(int numberOfRows, int numberOfCols, char charUsed);" and "print(3, 4, ‘*’);" print out this pattern: *...
[2 replies] Last: Thanks, I'll remember to avoid global declarations! (by khoipham1)
Project help in C programming
 
Hi I'm a new student in a C programming class and I need help with my code because I have very large if and else loops but have a hard time trying to condense i...
[5 replies] Last: Thank you so much!!! This really helps a lot! (by Waqamole)
Need to fix my code
 
The point of the code is to make an RPN calculator. Everything seems to be working fine, except for my "quit" and "clear" commands. Whenever q or c is entered t...
[2 replies] Last: @OP Please use code tags. Go back and select the code and press <> in... (by closed account 48T7M4Gy)
Generation of 2 random matrices
 
Hi there, when I am generating two matrices of random numbers, these are always equal for a single run of the program. They change values at different runnings ...
[2 replies] Last: > I am using the time(NULL) for the seed > every time an object matrix... (by JLBorges)
by Mite
Mysql Creating table with c++ forms
 
Hi everyone i wanted to create a table in my mysql database through c++ windows forms in visual studio. i use the following code to do it: MySqlCommand^cr...
[4 replies] Last: Thanks alot sir...i got the issue it should be back-tick(`) instead of... (by Mite)
i want to play sound data in wavfile
 
i can make wavfile with c language. And i would play wavfile. but i want to play wavfile without playsound function. if i have wavfile data, How i make so...
[no replies]
Pointer arithmetic doubt in output
 
Please explain the output of the last line of the code. Why 3a when short is of 2 bytes? The output is : 0x23fe34 0x23fe36 0x23fe3a 0x23fe36 0x23fe3a #in...
[2 replies] Last: Ok Understoood. (by abcdef123)
operator overloading explanation needed
 
Please have a look at the code and let me know why doe we use the following: temp.longitude=op2.longitude+longitude; //how does this line work? temp.latitud...
[2 replies] Last: Do you realize that there are two latitudes available in that functio... (by jlb)
Cannot get my get() to work c++
 
Hello, I have read all of the references and forum questions on the get() function and basically i need to read an input from a file char by char and then there...
[4 replies] Last: I made newc a char and saved the input to a string. What kind of str... (by jlb)
Copy constructor + copy assignment
 
Hello guys, can anyone explain to me in a bit of detail how these two special member functions work? I am just getting a bit confused on how to implement them f...
[2 replies] Last: Yes I took a look there, thanks! (by zaratustra)
Defining some non-std vectors
 
Hi, Please take a look the exercises 16 and 17 here: https://s2.postimg.org/wyjwt43ll/image.png For 16 this code: #include <std_lib_facilities_4.h> using nam...
[5 replies] Last: I get those errors for line 54 where I want to use the overloaded op... (by jlb)
September 2017 Pages: 1234... 11
  Archived months: [aug2017] [oct2017]

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