Beginners - April 2017 (Page 19)

by Meden
Download txt file
 
As a fun side project for my C++ education, I want to learn how to download a txt file from the internet using visual studio. The file I want to download is htt...
[2 replies] Last: I'm sorry, I may need some further clarification. szUrl is the dow... (by Meden)
calling function into main.
 
hi i cant figure out how to call a function into main this is the function- im passing a vector over to this function and then trying to call it in main void...
[4 replies] Last: thanks! that worked (by Bluexorcist)
bubble sort issues
 
I having trouble with my bubble sort in my sorting function(sort_array) Am not sure if its a syntax error or its logic it just that every time i run It will dis...
[4 replies] Last: std::swap is in <algorithm>, so OK. Oooops! Terrible bloop! :$ Thank... (by Enoizat)
passing 2D array to a function using double pointers?
 
So I have to write a program that will count the cubic values of two-dimensional array elements. The main program should load matrix dimensions (the user must r...
[1 reply] : Here is a start to how you can declare you dynamic 2D array and pass i... (by closed account 48T7M4Gy)
by tom457
Purpose of Bool Function
 
In the following sample program, I'm not entirely sure why bool addNumber(int); is a Boolean function. The code would work just fine if this funct...
[8 replies] Last: Using a function that returns bool (or int) would make the code cleane... (by boost lexical cast)
by Chamat
Removing leading zeroes from an array of integers
 
I have an array of integers that may result in many leading zeros such as 000000000000000001234 when I want just the "1234" Bonus question: if ...
[11 replies] Last: Since you're using a fixed length array, you can't remove the digits. ... (by dhayden)
Write a program to read 4 numbers and find the maximum, the minimum and average.
 
what i took in class so far: if-else statement switch for loop is it even possible to do it with those without it being a very long code
[2 replies] Last: thanks (by Lockfiction)
Creating a Window (Win10)
 
I am just beginning to learn C++ (in the hopes of creating a little program of mine I've wanted to do for a while). I was wondering if someone might be able ...
[8 replies] Last: I'll bear that in mind. It's probably best to use Win32 then, just to ... (by LjSpike)
by Drakk
Struct arrays and functions to print them
 
Write your question here. I must be doing something wrong here, i am attempting to take a structure pass it to a function that reads some values from a file to...
[4 replies] Last: That's amazing, i can almost see how it works....I will try to use thi... (by Drakk)
Close a window instead of minimizing it!
 
I'm looking for a C function that closes a window i've tried CloseWindow(HWND) and i'm unsure of how i'd aim ExitProcess() at a specific window. all that CLoseW...
[1 reply] : You can try SendMessage() with WM_CLOSE. https://msdn.microsoft.com/en... (by integralfx)
Write a program that works in the same fashion as a message composer in the old mobiles.
 
The program must receive integer input. When use enter 2 the program outputs letter ‘A’ and if 2 is pressed twice, the letter ‘A’ will disappear from sc...
[no replies]
How do I output my code correctly?
 
Hey Yall, So I have two questions: One, I am working on a 2d array to initialize it to an enum value and print it out. However, I don't know how to print out t...
[2 replies] Last: I don't know why, but my code keeps crashing my compiler. I am using a... (by pdgaming)
by rufi0h
While loop when opening a file
 
Please help me figure out where my while loop is not functioning correctly. The goal is to read numbers in a input file and tell what percent of the numbers ar...
[7 replies] Last: Just to make it easier to read :+) It's an important concept. Another... (by TheIdeasMan)
Need help with the Knight Tour problem
 
I'm new to programming and could use some help. I need help getting started on this. I'm lost on how to start approaching this. I have some idea but if someone ...
[1 reply] : Well, first you will have to figure out how it works on a chess board.... (by SamuelAdams)
by ST0995
Raise the first digit to the power of the second digit.
 
I'm having trouble with my homework assignment because I'm stuck on this problem: If the number is a two digit number, then raise the first digit to the power...
[7 replies] Last: Thanks that helps a lot! (by ST0995)
Max & Min
 
Given the integer variables x, y, and z, write a fragment of code that assigns the smallest of x, y, and z to another integer variable min. Assume th...
[1 reply] : Try it, test it, see if it works. Spoiler, it doesn't. First, you are... (by joe864864)
Reading file into a Array
 
I'm creating an address book program that should prompt user for a filename and read it into an array. I having trouble properly reading the file into the array...
[no replies]
BST balance
 
I am trying to balance a tree by height (an AVI tree). When I give it a tree like this: Pre Order Traversal: 15 8 5 3 6 12 18 It works fine, but when I...
[1 reply] : In your CheckHeightAndRotate, you need to add a while loop right after... (by Lord Razgriz)
stuck with the functions
 
Help! i can't seem to figure out how to call the function results(); am doing something wrong here? #include <iostream> #include <cstdlib> #include <ctim...
[4 replies] Last: i tried the option for when the two players are tie and then they ne... (by AbstractionAnon)
by artrox
Simple tree structure using vectors. Looking for feedback
 
Hello. I've implemented a simple tree structure for a computer vision project. It's the first time I've done anything serious in c++ so I would very much apprec...
[no replies]
April 2017 Pages: 1... 1718192021... 34
  Archived months: [mar2017] [may2017]

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