Beginners - September 2015 (Page 28)

mode function
 
hello guys, i was trying to make my mode function, but it didn't come out right. could u guys pls help me have a look?? int mode(vector<int> arr, int siz...
[5 replies] Last: The sort then won't help for: 4 3 1 2 2 1. then my mode will become ... (by Kevin C)
by fguy
Problem with basic input loop
 
Greetings. The problem I am having is with my read_ages function. It just loops without pausing to let me enter the data. This must be something obvious but I j...
[2 replies] Last: Thanks. I can live with that mistake. (by fguy)
Find files in folder question
 
Hello, What I'm trying to do is listing all files in a specific directory, the program already knows the name and path of that current directory, so that doe...
[1 reply] : Do I need those if I already know the directory path? Yes, although t... (by helios)
*fstream* how to change content inside, or changing lines inside of it.
 
I searched for a solution for SO long, but I DONT find one! can someone please help me?? how do I rename a line, or change a line in files?? thanks.
[5 replies] Last: Thanks Mate (by closed account 1vD3vCM9)
Moving a value along a grid
 
I am trying to make a program in which you input an integer, to move one unit (up, down, left, or right) along a grid. I am not entirely sure what I have wrong....
[1 reply] : @joohoo200 You have to check first that the move does not take you pa... (by whitenite1)
Easy calculator, confusing problem
 
Just took a couple of minutes at the start of class and was confused why it didn't work. It says the error is at the first "{", by the way #include <iostream...
[5 replies] Last: Thanks! that helped ^! (by jonahg119)
GetUserName() returns 1
 
Hello I'm trying to get the username of the current user (not computer name). I'm also trying to do this OOP using classes and functions/methods, but it ain'...
[4 replies] Last: ^Okay, thanks! Thanks for helping me out efficiently and fast! (by Nielyboyken)
by h4ever
WM_HOTKEY never passes dlgproc
 
I try to register ctrl+click key and ctrl+numkeys. void OnWM_Create(HWND window, CREATESTRUCT * cs) { int i; RegisterHotKey(window,1, MOD_CONTROL | MO...
[4 replies] Last: My mistake, the code is ERROR_INVALID_FLAGS 1004 (0x3EC) I... (by h4ever)
Read a text file into dynamically allocated array and return a pointer to array
 
So I have searched my issue quite a bit and found a few helpful tips, but I haven't quite found an answer similar enough to my question to help me get over my h...
[12 replies] Last: By making it one long concatenated string I am not sure how to separa... (by dhayden)
fstream.peek() moving file pointer?
 
Hi there. I am trying to write a program that reads a series of commands from a text file and draws text art into an output file. I want to make bolded lines (a...
[1 reply] : Generally you want to seek each time you switching from reading to wri... (by MiiNiPaa)
I don't understand this error
 
Can you help me understand this error. error: qualified reference to 'Product' is a constructor name rather than a type wherever a constructor ca...
[1 reply] : The name Product::Product is used to define the constructor of the c... (by JLBorges)
Find worst-case Big-oh runtime
 
After reading many articles, pdfs, and other resources about Big-Oh notation and runtime complexities, I'm still having a difficult time with runtime analysis a...
[6 replies] Last: JLBorges is right. I noticed it after I went AFK, so I could not chang... (by MiiNiPaa)
TURBO C++ minimizing
 
Well this ia not actually regarding a code but a problem that i'm facing , i use turbo C++ for 64-bit on windows 8 . after i open it it works absolutely fine, ...
[no replies]
using namespace std
 
Dear fellow programmers hello ! i am new to C++ programming and i am here with a question that may seem chidlish to you ..but i know that some people use " u...
[3 replies] Last: My thanks to JLBorges ..that link actually helped..its a great thing y... (by immanan)
Libraries Help
 
//Newbie Help Basically the problem I am having is that I am having to constantly download header files to place in my projects because they are not currentl...
[no replies]
getline function
 
In my program I am trying to cin a book title and have it search my book.txt document for the book. However I cannot get my function to cin the whole title with...
[1 reply] : However I cannot get my function to cin the whole title without space... (by MiiNiPaa)
for loops & switch additional input
 
how can i fix this code, im trying to learn C, well basically it works, but it enters an unecessary input after, a valid one, so the loop would end after 5 ti...
[2 replies] Last: thank you! this helps!! (by tochivelez0)
looping through a string?
 
Hey everyone I'm not sure if this is a stupid question or not, but I thought of it now I want to know the answer. What is the most efficient way to loop through...
[2 replies] Last: More efficient (O(n) vs yours O(n 2 )): //http://en.cppreference.com... (by MiiNiPaa)
help regarding regarding ++a or a ++ etc
 
Write your question here. #include <stdio.h> #include <conio.h> int main() { int a = 10, b= 10, c, d, e; c= ++a + b++; d= c++ + a++; e= (-...
[4 replies] Last: thank you! (by tochivelez0)
TicTacToeTrouble
 
Hi, I am a complete beginner trying to create a tic tac toe game. My code compiled and ran; however, after prompting the user to indicate a slot for their lette...
[4 replies] Last: # include <iostream> using namespace std; char board = { '1', '2',... (by JLBorges)
September 2015 Pages: 1... 2627282930... 42
  Archived months: [aug2015] [oct2015]

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