General C++ Programming - May 2014 (Page 12)

How does this program compile?
 
See the following code sample: #include <iostream> using namespace std; int main() { string hello = "Hello world!"; cout << hello; ...
[9 replies] Last: Is this accidental, or is it just a hidden feature? That depends on... (by Cubbi)
correct way to avoid Memory leakage
 
Hi, i wanna ask you what is the correct way for avoid memory leakage.. INSIDE A CLASS The only situation in wich i could have memory leakage problem is w...
[7 replies] Last: > The only thing that i have to do is to release dynamic memory in the... (by ne555)
how to code simply GUI in c++
 
Hey I want to code gui in c++ but I can't find any ways to do it. I have tried GLUT but that didn't work so could anyone help me or tell me how to work with glu...
[6 replies] Last: @nicodasiko Well, if you're on Windows, then just use Visual C++. Mind... (by Just Me)
to find factorial
 
#include<iostream> #include<conio.h> using namespace std; void main() { int num,fact; cout<<"enter the number to find factorial"<<endl; cin>>num; fa...
[4 replies] Last: its not ur concern wether i upload any program or not... (by hasnainafzal)
by JOLO
transform program to program using class
 
Hi, i have my program to load info about students from .txt file Mrkvicka Jozef 2 1.75 2.1 0.4 1 0.49 1.27 Hrasko Jan 0.1 0.38 1 1.2 Mladek Peter 1.6 0....
[13 replies] Last: student.cpp Line 1, 11. Get rid of stdafx.h, _tmain and TCHAR. These... (by AbstractionAnon)
stringstream
 
how can i add integer value to a stringstream or read an integer value from it?
[1 reply] : std::stringstream ss; // how can i add integer value to a stringstre... (by Peter87)
http response receive using socket
 
Hi, I make a simple c++ http post request using socket and it is working fine. But I have no idea how to get only the message of the response. Here is my receiv...
[2 replies] Last: i need to parse the response message so instead of outputting the head... (by hacknayan)
help me : Error "error: invalid type argument of unary ‘*’ (have ‘int’)"
 
I try to compile this code in NS2 void AODV::forward(aodv_rt_entry *rt, Packet *p, double delay) { struct hdr_cmn *ch = HDR_CMN(p); struct hdr_ip *ih = HD...
[2 replies] Last: thank you so much ! It replaced alpha and beta to n and m . It done . (by huyenlya5)
Generic C linkedlist compilation erros
 
I am trying to write a generic linked list in c, but for some reason i keep getting errors saying "incompatible pointer type. This is the code and erros: ...
[2 replies] Last: Ok thanks. I edited the post before I saw your reply. Thank you for th... (by haglerchristopher)
Replacing doubles in string with another double
 
Take this string for an example, "asdf 9.000 1.232 9.00 23.1 545.3" Is there a way to replace any of the doubles with another double? Example: Replace the...
[1 reply] : #include <iostream> #include <string> #include <sstream> #include <ve... (by JLBorges)
by c0ld
Open File for Writing, Relative Path Given On Runtime
 
How will go on to doing this I have a general idea. But don't know well how it make it work for my project. Runtime means I am going to have to give the path at...
[1 reply] : So you're saying that you would have a folder called "my-output" in th... (by Yay295)
Finding location of double in string
 
I know how to find the occurrences of a character in a string, but I have a more specific problem. For example, consider the string: " C 1.3825 4.0000 1...
[1 reply] : Iterate through the string for a space char. If you find one, check if... (by Yay295)
simple matrix code wont run
 
Here is my code.. not sure what the issue is but it keeps crashing. Im not fnished yet but i cant get passed this part. i have no idea why its crashing. Any and...
[1 reply] : The compiler needs to know the size of arrays at compile time. row1,co... (by wildblue)
Calling an external function with GetProcAddress crashes the app
 
I've been trying to call an external function with the GetProcAddress function but everytime i call the function it crashes the console, ive been looking but i...
[no replies]
Help me with this POO please(iii)
 
There appear the following errors in the "error list": Error 5 error C2371: 'date::add' : redefinition; different basic types line 25 Error 4 error C2556...
[3 replies] Last: "MiiNiPaa", OK, but it wasn't all the question ... ¬¬ //date.h #inc... (by jonanderdiez)
by bortm
very hard project
 
hi everyone , I have very hard project can you help me Project 9 Reliable digital transmission using parity coding A digital data communication syste...
[no replies]
Converting netpay to string
 
GOOD MORNING, ITS 2AM AND IM TIRED LOL. void convertNetPay(float netPay, char *netPayString) { int numHuns, numTens, numOnes; char OnesTable ={"...
[4 replies] Last: You could use a map of strings and their values, and simply write them... (by TwilightSpectre)
complier error
 
Hi guys! I am working on a small project which contains three files 1. MainTest.cpp 2. CashRegister.h 3. CashRegister.cpp I have done everything that ...
[7 replies] Last: Class declaration in header file. Definition of class functions in cpp... (by MiiNiPaa)
Converting string into double array
 
I am having a lot of trouble extracting values from a string into a double array. I have a string that looks something like this: "asdf 1.320 1 234.43 5.00...
[8 replies] Last: Lots of practice. :D (by Yay295)
by erim
[Error] invalid types 'int[int]' for array subscript
 
#include <iostream> #include<fstream> int decryption(int); int multiply(int,int ); using namespace std; main(){ int n; ifstream inFile; inFile.open...
[4 replies] Last: thanks. my mistake I didn't notice that on line 31 and 32 and it was n... (by erim)
May 2014 Pages: 1... 1011121314... 31
  Archived months: [apr2014] [jun2014]

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