General C++ Programming - April 2014 (Page 37)

Simple tic tac toe
 
Hey, I got bored so wrote a simple tic tac toe game, feedback will be appreciated #include <iostream> #include <stdio.h> #include <windows.h> using namespace...
[1 reply] : 1) In several places you mix the TILE_OWNERS type with char variables... (by AbstractionAnon)
Not displaying Tree elements
 
Not Displaying tree elements. Here is the code. Want to know the error. #include <iostream> struct TreeNode { int number; TreeNode* left; ...
[1 reply] : One obvious problem is that you never initialize root. PLEASE USE ... (by AbstractionAnon)
by dnulho
Sorting an array by using a linked list
 
I have two arrays of characters that I want to combine and sort according to an internal variable (init) using a forward-iterating linked list. The two arrays m...
[1 reply] : Sort the separate lists first, then 'sort' them together. In both ... (by Duthomhas)
Which C++ creator program to use?
 
Hello, Which C++ creator do you guys recommend I download on my computer for free? I used to have QT creator, but I want to try to download a different one....
[2 replies] Last: I guess you mean IDE. There are several: Code::Blocks and Visual C++ a... (by coder777)
difference between erase and clear
 
vector<int> *vec; allocate memory and suppose vec conatins 10 values then erase(vec->begin(),vec->end()); vec.clear(); both should be used or any...
[1 reply] : clear() removes all entries from a collection. erase() can remove a si... (by kbw)
"\t" not working properly
 
Sometimes when I use "\t" to space things, it will skip certain elements, i.e. the tab character won't appear for some cout. For example: void print() { ...
[2 replies] Last: If you are using a to call the print function you probably aren't cal... (by giblit)
comprehending this question
 
Wondering if someone could explain this for me in further details? For this problem you are given: const int MAX_STUD = 100; bool failing ; bool passing ;...
[2 replies] Last: Thank you (by EddyZaEagle)
RPG path based?
 
My RPG is a click based game you click where you want to go and it will need to dodge all the objects a bit like the game runescape. If the path is blocked it n...
[1 reply] : I strongly recommend implementing a pathfinding algorithm such as A*. ... (by closed account N36fSL3A)
VS 2012 Lib and DLL File Exported in Different Directories
 
Okay, so I have a program where I want to export the .lib file in a "Lib" folder, and the .dll file in the "bin" folder. How can I choose where the lib file and...
[3 replies] Last: Thanks! (by closed account N36fSL3A)
by quayda
Need to place nested loop where nested isn't necessary
 
I wrote this code, and everything was working well, but part of the assignment is that it must include nested loops. Once I added the nested while loop, which i...
[3 replies] Last: Once you set loopVol = final - you get an infinite loop because the wh... (by wildblue)
File Handling
 
Hello all, I am writing a string of characters using character arrays only . For instance, it asks the user for how many records you want. Say 3, it can va...
[no replies]
by franko
strange getopt_long problem: additional parameter gets stored only when other parameter is no integer
 
Hi, in my test program below i use the getopt_long function for argument handling. i have a long option with a required argument that gets read in corectly in ...
[no replies]
by patieB
using functions
 
Im getting this error when i try to run this program . "92 error a function-definition is not allowed here before token " and on line 118 " error expected'}' at...
[5 replies] Last: You wrote the program but do not know how to pass the argument? intere... (by requiem31)
by jay101
please help me correct this...
 
i'm trying to write a program that reads numbers from a text file( 21 12 44 21 -5 63 0 ) to an array and bubble sort them in an descending order, and printing ...
[2 replies] Last: Man, I had a long-ish post typed up and then my computer randomly deci... (by long double main)
Program that checks SQL Create Tables and Insert.
 
This program should read the SQL Statement Create and Insert Statements. Once statements are validated what the user keys in from the insert should be written i...
[no replies]
Help with Homework, functions, precision, outputs
 
Here is my question... Write a program which prompts the user to enter the principal, annual interest rate, the number of years and the number of payments...
[8 replies] Last: I finished it on my own. thanks whoever helped. (by Noob Programmer)
need help with a program
 
i am currently in a c++ class and i am new to all this for some reason i do not get this math for the program.....please help i have to create a program that wi...
[3 replies] Last: 1) You need a variable to contain the result of your calculation, the... (by AbstractionAnon)
Diff: new int [] & new int [2]
 
Quote: int * foo; foo = new int ; Alright, the above is taken from cplusplus tutorial, it shows that foo is a pointer pointing to the 1st int which is int...
[6 replies] Last: It's mostly a scope thing. int x ; That creates a local array t... (by Disch)
summation
 
Hello, i am beginner in C++. i want to add 10 different values as input and make summation of that. Can anyone help me to do this? #include<iostream> ...
[1 reply] : You missed the input part of the process. Sure you want 10 numbers but... (by Smac89)
Reversing words
 
This is a google code jam question. The input consist of 1st line:integer tells you how many cases then the number of lines of text separated by space. ex: 3 t...
[2 replies] Last: Thanks smac89. Very intuitive. Works fine. Cheers!! (by generic2709)
April 2014 Pages: 1... 3536373839... 41
  Archived months: [mar2014] [may2014]

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