Beginners - October 2014 (Page 44)

by gsoble
Propbaly dumb mistake... Nothing is being inserted into my class
 
I have a class that takes an entry object, which consists of a word and a vector of lines in a file where this word is found. It then inserts this isnto a vect...
[1 reply] : If index.at(n) is empty, the for loop is skipped and we go to line 1... (by cire)
hour conversions functions
 
Hello, Everything with this works except the do while in Main does not print the cout message and end program when I enter a zero, I'm pretty sure the syntax...
[3 replies] Last: Thank you, the program won't calculate the time changes unless I use t... (by JoJodoggy1)
by Jocke
Force Shutdown
 
Hello again! Brief information about my code: I use several void functions, which are called from the main function when so requested by the user (using swi...
[3 replies] Last: No. The post there has just what you need. See, #include <iostream> ... (by shadowCODE)
by mrish
error LNK2019: unresolved external symbol
 
Hello, I'm trying to learn C++ and compile a program to swap between letters in a string. #include <iostream> using namespace std; void swap (char *a...
[1 reply] : Sounds like you selected a Windows application instead of a console ap... (by AbstractionAnon)
How to delete a non-dynamic object?
 
I tried googling this but only results for deleting objects created with the keyword "new" came up. I'm trying to loop through a vector of class objects and if ...
[4 replies] Last: Thanks for the replies. I was curious if just erasing an object from a... (by wh1t3crayon)
number pattern struggles
 
So our professor asked us to make a program using nested loops that would output 1 246 357911 46810121416 579111315171921 681012141618 7...
[9 replies] Last: #include <iostream> #include <cmath> int main() { int row, col, ter... (by closed account 48T7M4Gy)
adding randomness
 
Hello. I found a code online for controlling 6 LEDs. There's a section for lighting them in a loop, and it does the LEDs in the same order every time. I want...
[4 replies] Last: The use of srand/rand is deprecated. isn't it too early to call that... (by anup30)
How useful can the "new" keyword be in high level programming?
 
From my understanding, every time I use the new keyword, all it does is just create a new array and assigns the address of the array to the pointer. But my ques...
[3 replies] Last: Something else you can do with new, use a function to create and delet... (by megatron 0)
help with a function
 
so im making a slots game for my class and having trouble with my function. so my code starts with a random number generator then i want to take that number and...
[1 reply] : #include <iostream> #include <string> #include <ctime> std::string f... (by mobotus)
Help passing command line arguments to the “_chdir” function (VS2013 C++)
 
Hello. It's safe to say I suck at programming and it's really hard for me to wrap my head around some of the concepts, but I really enjoy it. Right now I am try...
[1 reply] : try the simple example below for example the name of your program is ... (by rafae11)
Prime Number Code
 
Can anybody help me write this short code? I've only written a couple programs so far but with this assignment I don't really know where to start. I was already...
[5 replies] Last: #include <iostream> bool prime (int number); using namespace std; i... (by anup30)
Calling function
 
My program is supposed to ask for 4 numbers and i will cout the numbers as x|x|x|x. Poblem is the compiler wont call my function. Any ideas? #include <iostre...
[3 replies] Last: Yes: line 12: int newBoard = 0; line 21: return newBoard; ... (by coder777)
loop help!
 
Hi I'm having problems with a homework assignment. The task is to write a C++ program that allows the user to enter as many non-negative integers as they would ...
[9 replies] Last: I was saying with mine that when you have entered a negative number it... (by crimsonzero2)
heap corruption
 
Hey guys, I have a CS1410 class where I have to write my own vector class and then run it through a driver that has been provided. I'm getting the following e...
[5 replies] Last: @Ganado: The offset of -1! I understand now what you all were referrin... (by patrickweiss52)
Need Help for Homework
 
Hello guys, I've trying to figure this problem out, but I can't wrap my head around it. I have to write a program that prompts the user to input an integer betw...
[2 replies] Last: First thing is you have a semi-colon on line 17 you don't want. Now t... (by Ganado)
Sort numbers
 
Write your question here. I am trying to make a code that will sort numbers in order, what is wrong with this code. I am not a computer guy, and this is my las...
[1 reply] : 1. The limitation said it only handled integer, why do you still use d... (by Z feng)
by Z feng
Problem with splitting LinkedList and Merge Sorted lists
 
I know there were many different solutions online, but I really want to know is there a way to make my function work. I am making a program to split a linked ...
[no replies]
Best way to do collision so the player can still move if collided?
 
Let's say the player moves to the right and hits a wall. I know how to check for collision, but how should I make it so the player can't actually collide with t...
[no replies]
by Korcha
Starting/ending for transform()
 
Hi, so obviously I'm a newbie. I have no idea how to change the ending position of the transform function. So... transform(myStr.begin(), * , myStr.be...
[1 reply] : #include <iostream> #include <cctype> #include <string> #include <alg... (by lonelylense)
Overriding an inherited function
 
Hello, below is my code. So basically, i am not sure if i am overriding a base class' function. for example. In my 'famillyTruck' class i have the same name ...
[no replies]
October 2014 Pages: 1... 4243444546... 70
  Archived months: [sep2014] [nov2014]

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