Beginners - June 2013 (Page 46)

How to add custome libraries to Microsoft Visual C++?
 
Hi I downloaded the library Cimg and I want to know how to add it to Microsoft Visual C++. Thank you!
[4 replies] Last: This is the setup for SFML. You need to do the same thing for pretty ... (by kbw)
by zxcnd
cannot allocate an array of constant size 0
 
Hi! am reading the csv file,however it works when I initialize the data statically.But, the value needs to be declared dynamically and am doing this using vecto...
[1 reply] : We need to see the actual line that's generating the error along with ... (by kbw)
Debugging Issues
 
Tasked with creating a code to read in a file of books and their respective authors, organizing the information into two arrays and outputting. The arrays and f...
[1 reply] : .get member function takes c-string and size as parameter. http://en.c... (by MiiNiPaa)
by a sk
Matrix size
 
Below, when I run this with a1(20,5), the program displays what is expected, but it also gives a "Segmentation fault (core dumped)" message. However a1(20,4) wo...
[7 replies] Last: Thanks. I guess what I was incorrectly assuming that pointers don't oc... (by a sk)
Vector function?
 
Hi, I have some code, and I get an error while running it: //GameVectorz.h #ifndef GAME_VECTORZ_H #define GAME_VECTORZ_H #include <vector> #includ...
[1 reply] : What is the purpose of int player on line 4 also you can not push a ve... (by giblit)
by new2c
My class declaration and function isn't taking the 5 arguments that it needs.
 
I have to write a program that takes three employees that displays their name, id nmber, department, position and years worked. It has to be done using a class ...
[6 replies] Last: As TheIDeasMan has already said use an initializer list. Constructor... (by giblit)
Error with pointers
 
Hi, I am a newbee just started to learn C++. After reading the chapter on pointers I decided to play around with pointers & have written this code to basically...
[2 replies] Last: Hi pogrady, thanks a lot. That solved the problem perfectly.. (by odyssey)
Assigning variables to class
 
Hi, I feel like a noob for saying this, but how could you assign variables to a class, but not inside it? For example, you have an if statement that says if ...
[4 replies] Last: Thank u gilbit :) (by SourceCoded)
by sl227
please help with homework
 
here is my code.... for some reason my program won't calculate the grade it just gives me an f #include "stdafx.h" // Needed for Visual C++ Express 2010 #in...
[5 replies] Last: Yeah I just figured his loop would start at 0. I think the while loop ... (by giblit)
Fork()
 
Please someone!! I need use FORK() to do the code below run in three differents processes: 1- void primo(int nr1, int nr2) 2- { 3- int i, j, numero; 4- ...
[1 reply] : 1. fork() only works on unix-like systems, make sure you're not on Win... (by LB)
std::thread question
 
So, with about a semesters worth of C knowledge, I decided to get into C++ in the past few weeks. After a much smaller program that prints a few numbers (withou...
[2 replies] Last: Inclusion of the "this" pointer fixed the problem. Thanks! Could you ... (by angus725)
Please point out the logic errors in this simple program
 
There are logic errors in the program. Mainly in the for loop. Please point them out. Thanks #include <iostream> #include <cmath> #define PROMPT "Pl...
[4 replies] Last: You also want to use % to see if it has a remainder. Instead of /. So ... (by gobiking)
I am trying to find the amount of prime numbers between 1-100
 
Here is my code, for some reason I am getting 51 when the answer is 25. The reason I am using a user made function is because I am going to be expanding the cod...
[1 reply] : Well, for one, replace the last few lines of the isprime function with... (by Ispil)
What does "VECTOR" exactly do?
 
HI! I have been told to write a class like "vector" class. I wanted to start writing a class that creates linked lists, but before that I wanted to make sure ...
[6 replies] Last: If you know what templates are use those. http://m.youtube.com/watch?v... (by AlitCandle)
Creating "Library" Program
 
I am writing a program that stores file.txt strings into parallel arrays. Once I have my arrays, create a loop that prompts the user for these following input ...
[no replies]
Can you explicitly call destructors when dynamically allocating memory?
 
class example { int * dyn; public: example() { dyn = new int ; } ~example() { delete dyn; } }; int m...
[2 replies] Last: Generally, you shouldn't have to call deconstructors anyway. (by Ispil)
Fibonacci series
 
Enter the value of X: 37 Fibonacci Series between 0 and 37 are: 0, 1, 1, 3, 5, 8, 13, 21, 34 i cant write the code for this problem. pls help.......
[2 replies] Last: Well, first number is 0, second number is 1. Third number is first plu... (by Ispil)
What's wrong with this?
 
What is wrong with this code? why does it play thought the whole thing without any user input at the choices? and why do the names display as random numbers aft...
[5 replies] Last: it's best to use getline(cin,name); in case the user enters their firs... (by sakonpure6)
Need help with reversing array
 
I need to take the array that was generated and put into a file and reverse it. How can i do that? This is what i have so far. How can i make a function to do t...
[4 replies] Last: You can also even use this really handy library called algorithm if yo... (by giblit)
what does "pointer(char*)pointer2" do? (1,2)
 
Hi everyone! so with the below code... I understand how all of it works, except the line. pchar=(char*)data; to catch you up, "pchar" is a char pointer, and...
[20 replies] Last: char function ; ((void(*)())(*((void*)(&function))))();//... This i... (by JLBorges)
June 2013 Pages: 1... 444546474849
  Archived months: [may2013] [jul2013]

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