General C++ Programming - November 2013 (Page 13)

extract
 
I am a beginner and I ALWAYS have the toughest time doing I/O files. It's extremely frustrating. It "seems" it should be so simple. The program should find a...
[2 replies] Last: Thx for giving me some insight but I'm still not that advanced yet.. I... (by closed account ohf3T05o)
by VuKid
Why is this only saving one line?
 
I am loading a text file......... trying to save the results into another text file but it is only saving one line to the new text file. There are hundreds of l...
[3 replies] Last: A useful thing when you want help with a code snippet is to provide a ... (by cire)
brick breaker game
 
can anyone tell me how to move that pad towards right or left ??
[10 replies] Last: So lines 125/126 are you drawing the paddle, right? You are drawing t... (by Disch)
a macro for redim an array
 
i'm trying building a new macro for change the array size: #define redim(varname,x) ((sizeof(varname)*) realloc (varname, x * sizeof(varname))); int b;...
[10 replies] Last: i'm using C++ 11. why the macro? because is then more easy to translat... (by Cambalinho)
Configure Netbeans basic settings [NOT SOLVED]
 
Hi, I want to configure netbeans 7.4 settings for c++.I'm posting here because netbeans forums are close to dead . Can anyone tell me how to do the following...
[3 replies] Last: This isn't some kind of paid rapid response team. Really? Wow! Thank... (by Silver Falcon)
about variant type
 
i'm building the variant type: #include <cstdlib> #include <iostream> #include <string> #ifndef VARIANT_H_INCLUDED #define VARIANT_H_INCLUDED class variant { ...
[7 replies] Last: heres the template class: template <typename a> class variant { priv... (by Cambalinho)
what is not good in this function?
 
void set(int newprice=-1,char newname ={"NONAME"},int newqty=-1) { if(price!=-1) price=newprice; if(strcmp(newname,"NONAME")!=0) strcpy(name,new...
[1 reply] : Your warning means that you don't have c++11 enabled in your compiler.... (by closed account 3qX21hU5)
need help with cgi/c++
 
so i want to make a terminal for my website and BHXSpectre recommended cgi (which i love... btw so thanks for that... c++ web design. just one more reason to no...
[2 replies] Last: then why post? (by closed account Dy7SLyTq)
Classes:memberfunction doesnt access right pointer
 
Hi, my task is to print the dynamic array "tensor", which is can be accessed through a private pointer "***tensor". The function "print()" is a member-function ...
[3 replies] Last: This is correct, right? Exactly (by coder777)
about global scope
 
(correct me if i mistake) the Global Scope is for create and initializate variables, create functions\class's\namespaces and more... i understand that. (sorry...
[6 replies] Last: bad the C++ don't let overload the '::' operator ;) thanks for all to ... (by Cambalinho)
[macro] - concat strings
 
i'm creating a nice macro. for do from here cout << (string)"hello " + "world"; to here: cout << "hello " + "world"; but for these macro isn'...
[6 replies] Last: thank you for all to all (by Cambalinho)
problem
 
Hi i seem to have a problem with my code specifically around the area "getline(cin, sPointsXY);" here is my code: #include <iostream> #include <string> ...
[no replies]
free the memory in client server program
 
How to free the memory and address,value Server: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/types.h> #include ...
[1 reply] : I don't see any allocation. What memory are you talking about? Also,... (by kbw)
Basic Classes concepts are creating big problems.
 
This Question is removed. It's no longer available.
[12 replies] Last: Great article, Disch. Cheers. Edit: Please don't delete posts. They m... (by MrHutch)
idea for a new container
 
i use the term new pretty loosly. so i know that there are pointer containers in the stl, like auto_ptr and shared_ptr. i dont know what these do, but i do know...
[12 replies] Last: You're using singular delete (delete instead of delete like you'd ne... (by closed account Dy7SLyTq)
by print
string as a constrain(?)
 
hi, i have a rectangle problem, the point of the program is to ask user, to give name to the rectangle, coordinate of it and so on. my main problem is in the n...
[no replies]
Stoi causing R6010 abort()
 
I'm trying to convert a string into a integer and when I call stoi(line) it causes the program to crash. int main() { vector<int> numbers; int i; str...
[1 reply] : You are not checking to see if your input was successful before you fe... (by cire)
Making a program using C++
 
I am looking to make a program for C++ that has a GUI other than command prompt. The program I am trying to create will ask certain questions and display the r...
[5 replies] Last: For some beginners, using C++ to display GUIs and graphics can result ... (by J4ke)
by dkaip
c++11 delete an object from a container.
 
Hello. I have a container in c++11 and i must delete first object and i don't know how... for (const prob& p : *static_cast<vector<prob>*>(list.listData)){ /...
[2 replies] Last: Ok i found the ssolution ... cats.erase(cats.begin()); Yes listData... (by dkaip)
by olleh
Dice game, How to go to next step.
 
.
[2 replies] Last: Hey TC, what did you do with your post? Leaving so soon after someone ... (by Zhuge)
November 2013 Pages: 1... 1112131415... 46
  Archived months: [oct2013] [dec2013]

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