Beginners - July 2013 (Page 47)

Memory Exception
 
Hi, I'm back again with my mastermind program. It compiles, but when I attempt to run it, bad_alloc is thrown. I attempted to debug it with nothrow , but it'...
[4 replies] Last: The way you have it, you don't need variable argument lists at all: #... (by Lowest0ne)
macros
 
the output of this question is 12 6 12 ... please explain #define FUN(x,y) ((x)>(y))?(x):(y); int main() { int i=10,j,k; j=5; k=0; k=FUN(++i,j++);...
[3 replies] Last: let the preprocessor do it for you (-E for gcc) ¿what's the point of... (by ne555)
sort char and int
 
Write your question here. i'm trying to sort the value of hasil ,it already works but what i want is in the same time char cobac also sort when hasil sorted. ...
[no replies]
Error 3 error C2198: 'exit' : too few arguments for call
 
#include<stdio.h> #include<stdlib.h> #define prepaid_bal 10 double new_balance = prepaid_bal; double call_time, call_1, total_1; double call_2, total_2; ...
[1 reply] : That's a clash with the built-in exit function. You could rename your ... (by Chervil)
user input and reading from two txt files
 
i need help with having a user enter either 4-0.txt or 4-1.txt files i need both files going to EX4outfile i have all the calculations right for 4.0.txt w...
[1 reply] : infile.open(fileName); if that doesn't work compile it with -std=c++1... (by closed account Dy7SLyTq)
vector of pointer to typical array of pointer
 
Hi forum, I have declared an array of pointers as follows std::vector<cl_event*> eventList; Since i am not sure about the number of events i am g...
[2 replies] Last: vector::data() was added in C++11. You don't indicate what the dur... (by AbstractionAnon)
by sgli
Identify multiple mice and trigger events
 
Hello there, I'm fairly inexpierent in programing since i work in another IT-field. Maybe you can help me with this problem. I have between 4-6 usb mice...
[no replies]
Row matching
 
Hi, I am hoping someone can help me on this problem. I have a large data set (over a million records) with about 100 variables holding the results for each p...
[1 reply] : Let me see if I understand You've got > 1e6 rows, each one has 100 ele... (by ne555)
Accumulator and Count keeps throwing back junk.
 
I have to write a program that asks the user to input which type of gym membership they want, and how many months they want to join. The program is supposed to...
[2 replies] Last: Okay, thank you very much. I will apply these changes, and see if tha... (by brownshuga98)
by hubsch
Error reading a file ( i think )
 
// Euromilhoes v.01 #include <iostream> #include <string> #include <fstream> #include <vector> #include <iomanip> using namespace std; // VARIAVEIS GERAIS ...
[4 replies] Last: while( getline(Users,stringTemp)) { getl... (by Chervil)
pls someone explain this program....
 
#include"graphics.h" #include"dos.h" #include"conio.h" #include"stdlib.h" #define DELAY 1 #define SOUND 3500 void state(int x,int y,int mode); int i; vo...
[6 replies] Last: Thank you Disch for your answer but still i want to understand it . :)... (by surbhijain93)
by Vigii
Writing many txt files but with different numbers
 
Hi, I'm trying to create five txt files from one program. Exactly what I want to do is to create file name as follows Result-1.txt Result-2.txt Result-3.txt...
[1 reply] : ofstream::open accepts a character array, or in C++11 a std::string. ... (by AbstractionAnon)
by Nikury
Appreciate any help with my problem.
 
I'm quite new to c++ I'm experimenting a little with the CMD console, I'm really not experienced so the structure of my program is terrible, I'm freely open to ...
[3 replies] Last: Thanks a lot, to both of you. (by Nikury)
I need a quiz for C++ Beginner
 
As the tittle say, I need some quiz to develop my C++ language skill, do you have a common sites? Or you can tell me a program that should I make? - Sorry fo...
[2 replies] Last: http://projecteuler.net/problems (by mutexe)
Default argument pointer
 
Hello, I will pass an argument to function. I need compute int and string in this function; after int , string and bool in same function. I make this:...
[5 replies] Last: false is a literal; it is an integral constant prvalue that evaluate... (by JLBorges)
by vRltwE
Store a double/float (ie 1.2) in a 2 byte 2's complement format
 
Which approach could be taken to store a double/float value like 1.2 into 16 bit 2's complement format? Thanks in advance.
[6 replies] Last: > The documentation says the measurement in between +-1.2 and it is 2 ... (by JLBorges)
Record Display
 
Hi everyone, I have a question to ask you. -I have to implement a C++ program to display records that are saved to a '.txt' file (via I/O redirection). -T...
[no replies]
Enter included in fgets
 
I'm trying to input a user response with fgets but fgets is also including the enter. Is there anyway to get rid of it or not include it in the first place? Her...
[1 reply] : char* p = strchr( response, '\n' ); if (p) *p = '\0'; (by Duthomhas)
palindrome finder.
 
I am trying to make a palindrome finder using a brute force approach to ironically test an algorithim i am using for a spoj classic. Problem is, i have no idea ...
[2 replies] Last: i assumed that it's definition changed after i gave string t data. i a... (by theunkown)
by maxim
namespaces question
 
Greetings C++ gurus, I am experimenting with namespaces, and I would like to make a namespace packaged in a separate file so that it can be included and used...
[2 replies] Last: Great, it works! Thanks! (by maxim)
July 2013 Pages: 1... 4546474849... 53
  Archived months: [jun2013] [aug2013]

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