Beginners - January 2013 (Page 42)

undefined reference
 
I downloaded some libraries and linked them to my compiler.I use Code Blocks. However it's not working.It says undefined reference to winmain16 all the time. ...
[2 replies] Last: I watched some video and they use libraries.I think the problem is wit... (by darkovasic014)
Where's my .o file?
 
This is the first time I've used the Dev C++ program, and I'm learning C. I wrote a "Hello, World" program, saved it is "hello.c", compiled it, and got a "hell...
[2 replies] Last: Thanks! (by KevinAnsley)
program crashes for no apparent reason
 
Hello. I made a C program that should show how many times a letter is contained by a text. I run it and after I cin>> the letter the program crashes. Any ideas ...
[4 replies] Last: I am sorry. It seems that I showed incorrect code if you need to count... (by vlad from moscow)
by khal
Linked List
 
Hi, I created a singly linked List and would like to know what you guys think such as any ways to improve or mistake I have? Thanks in Advance LinkedList.h ...
[2 replies] Last: It was just for fun. I just wanted to know if the approach is correct (by khal)
Another simple code problem.
 
Hello again, another example from my book, this time it's a very simple calculator, on page 103/1100. Cannot seem to figure out why this if statement is not wor...
[3 replies] Last: You could substitute if-else statements for the switch statement. For... (by vlad from moscow)
Tic Tac Toe Algorithm
 
Can anyone please explain(or just give a link) the Tic Tac Toe Artificial Intelligence algorithm(think its called minimax), I don't want any code but just the e...
[3 replies] Last: Here is a link to an in depth explanation of the Minimax logic algorit... (by derrikjb93)
Having trouble with switch statements
 
I'm having trouble building a selection menu for my minesweeper game. Can anyone tell me why this jumps straight to case 2 every time, no matter what? Exam...
[2 replies] Last: Alternative to system call at line 34: std::cout << "Press \"ENTER\"... (by drognisep)
Hit enter and set that value to an char?
 
Hey guys...again. Hehe i seem to have my problems with what seems to be the simplest stuff. To the point. So what I was trying to do is make it so when a user h...
[3 replies] Last: you don't have to use conio. Use getline instead. #include <iostream... (by tntxtnt)
by Ryusko
Vector losing items
 
I had a piece of code that worked fine with arrays but isn't when I switched over to vectors. Essentially I create a vector in the main method and then pass it ...
[2 replies] Last: Ah, that fixed it, thanks. I forget that vectors are not inherently re... (by Ryusko)
if statement not working
 
Hello ! Im working my way through the programming: principles and practices using c++ and I've come across a problem a problem in the chapter 3 drill. The task ...
[2 replies] Last: Legend, worked a treat ! Thanks! (by aaronie)
by alivaf
exersices
 
how can i improve my studying? where can i find sample exams?
[2 replies] Last: My advice is learn standard algorithms and try to do some general task... (by vlad from moscow)
Clarification of how main cpp file include another?
 
Hi, I'm currently learning CPP and am trying to get my head round including other files into my main file. The example below is just me messing around ...
[1 reply] : MS VS deals with projects. As i have understood you added file 2 to yo... (by vlad from moscow)
by Dzoni
problem with DESTRUCTOR
 
Hi, problem is that in main i have only constructor and destructor of one Queue (it stays empty) but after my program back from destructor (destructor have only...
[2 replies] Last: aaaaaaaaaaaaaaaaaa sorry for stupid question, and thx (by Dzoni)
Where could i find the answers for the exercies in c++ primer
 
Yes folks, I'm new to the forum and c++. I've decided to start learning c++ so I'm well prepared when i enter into a foundation degree course on September. I'v...
[5 replies] Last: Naw that links no good for the 5th edition! Doesn't matter now anyways... (by aaronie)
by Dobush
Efficiently Structuring a Program in C++
 
Hello, Can any veteran programmers recommend books or give advice/tips for a beginner ordering (structuring) their first few programs. Regards, Dobush
[1 reply] : http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-... (by closed account zb0S216C)
Generating A list of numbered sentences
 
Here's my code #include <iostream> using namespace std; int Number() { static int iii = 0; return iii++; while (iii < 200) { ...
[2 replies] Last: I changed this return iii++; while (iii < 200) { ... (by Raindrop11)
Loop
 
I need to make a loop for up to 10 different homework grades. The user is the one who gets to pick the how many different grades to input out of ten. I could u...
[1 reply] : what have you got so far? This should be straight forward. 1. decla... (by guestgulkan)
How to exit program immediately if an exception occurs (without executing the rest of the statements)
 
try { cin >> foo; } catch ( exception& e ) { cerr << "Exception occured." << e.what() << endl; return(0); } cout << "Should not output this";...
[5 replies] Last: @ghantauke If you were meaning to catch exeptions thrown by cin >> foo... (by Cubbi)
How to allow user to enter input into an array without a limit?
 
I know you can dynamically allocate memory, but i'm not really getting how to do it. Also, i'm pretty sure vectors would be good for this. I've read about thes...
[3 replies] Last: Thank you for quick replies and good examples! (by closed account LN7oGNh0)
by adrem7
Writing to a different file depending on input value (ofstream)
 
Is there any way to write to a different file each time I change my input. My piece of code is as follows: #include <stdio.h> #include <string.h> #inc...
[8 replies] Last: Awesome, thank you! So in the end I have this: /* Create string st... (by adrem7)
January 2013 Pages: 1... 4041424344... 52
  Archived months: [dec2012] [feb2013]

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