Beginners - June 2013 (Page 43)

by kmb828
how to get a file name with a part of the file name?
 
I want list all the files with the same substring as a name? for example there are 10 files with same substring as "testoutput" I want list all of them. How ca...
[7 replies] Last: [quote=andywestken]Would it be better to use is_directory() rather tha... (by cire)
C Linked Lists
 
The code this far has the numbers being put in a linked list. How can I do something like this: Would you like to enter an integer (y for yes/n for no)? y ...
[no replies]
How does this not work?
 
It was working before, I don't know what I did, but i've searched and searched and can't find any reason for this not to work. I don't get any errors, but when ...
[10 replies] Last: Thanks (by Dominic4774)
Class error
 
Whenever I try to us my timer class I get this error: I:\CodeBlocks\Games\SDL\Events\main.cpp|69|error: could not convert '{false}' from '<brace-enclosed init...
[2 replies] Last: I fixed it, all I needed to use was an initializer list. Timer() : p... (by Retrokin)
Compiling SFML with cmake
 
Hi! Been trying to get SFML 2.0 working the last week. I've tried many things and I am currently using SFML built with cmake for CodeBlocks::MinGW. The fir...
[8 replies] Last: It crashes when using any type of SFML. I'll post on the SFML forum to... (by Jonas Wingren)
by Ch1156
How to output a string in random order
 
Ok so im making a game where you enter a word and it mixes up the word and the other person has to guess what it is but im unsure of how to actually mix up the ...
[16 replies] Last: so now you have to figure how to exit the game_loop or wut @.@ just a... (by tntxtnt)
Class help
 
Trying to access a parent class private variables from a struct defined within the class. see code for visual. class pInfo { private: int zphealth; ...
[1 reply] : The syntax is int pInfo::car :: GetHealth() const { ... } how wou... (by cire)
Returning arrays
 
How would I return an array. Nothing gets passed through this code when I run it, I ran it using strings and it works, but will not with arrays. I am a beginner...
[1 reply] : Functions may not have return type of an array (though they may return... (by vlad from moscow)
by DrNio
Reading text line and extract integer from each line
 
Hello guys! I would like some help with C firstly. I hope I am not out of topic. I have a txt file , every line will be like Producer 0 added 90 Produc...
[1 reply] : The functions mentioned could be useful. Perhaps strrchr and atoi migh... (by Chervil)
Problem with this Str-to-Int?
 
This program is to convert a string into an integer. However, it says that on line 20 (in the for loop), the iChangedNumber is uninitialized. What does that mea...
[18 replies] Last: What about this: int iChangedNumber = 0; int length = Number.... (by Chervil)
How do i display output of whole program in center of console app window?
 
I am working on a console app. I want to run my whole program's stuff at the middle of screen ( horizontally + vertically ). Is there any possible way to do th...
[1 reply] : ncurses ¿why do you care? (by ne555)
ofstream writing deletes every thing!
 
I have a High_Score.txt file and I want to (after the user finishes my game) to save it to the .txt file, however everything else in the text file will get dele...
[1 reply] : The way I did it is just re-save all the scores.. you're gonna have to... (by DrZoidberg)
Simplfy If and If else statements with vectors
 
Ok, so my teacher told me to simplify all these if and if else statements using vectors, but i have no idea how to do that. In my game i have 11 dungeons...so y...
[3 replies] Last: I still don't understand, but can someone please guide me there? Like ... (by damian519)
Keeping console open, "recommended way"? (1,2)
 
I have read the "Console Closing Down" thread (http://www.cplusplus.com/forum/beginner/1988/) completely, but there doesn't seem to be an answer I'm looking for...
[21 replies] Last: cin.ignore() did the trick! I did indeed have a hanging newline, th... (by StevetheHunter)
by animus
C++: Reading and Sorting Binary Files (1,2,3)
 
I've been scratching my head and putting this homework off for a couple days but now that I hunker down to try and do it I'm coming up empty. There's 4 things I...
[40 replies] Last: Well, it seemed to me that you are interested in listening, I can rapi... (by Chervil)
Assignment
 
Basic requirement of the system 6.1. Main Menu: - Arithmetic and Conversions - Matrices - Physics - Exit 6.2 Arithmetic and Conversions - Binary to...
[3 replies] Last: i don even know how many classes and objects do i need because once i ... (by elijahcwl)
How to practice in specific area of programming?
 
for example, classes and objects and recursion. is there any site that has an exercises in each of these areas? I keep on following the law "practice is the bes...
[1 reply] : These things are core concepts to programming in many languages, most ... (by LB)
by incxx
Errors in my program
 
I'm trying to create a program similar to a cash register that will calculate the total of the items as well as print the receipt. However, when I build it, it ...
[9 replies] Last: thank you so much for your help. I got it to work :) (by incxx)
generate a sequence of numbers from an array
 
I have 2D array of size 10*10. I need to generate 10 array indexs from array index 10*10 at one time. How can i do that?
[3 replies] Last: int index = std::rand() % 100; int row = index / 10; int column = ind... (by vlad from moscow)
class work help
 
We did this program in class and I couldnt get the progrma to print the binary numbers added together. The point of this program is to add binarys. But their...
[7 replies] Last: > could you just explain where some of my code went wrong. please I'v... (by JLBorges)
June 2013 Pages: 1... 4142434445... 49
  Archived months: [may2013] [jul2013]

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