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

Having troubles with understanding the assignment to the pointers (using <dirent.h>)
 
Let's say I have 11 files with extension ".exe" files in the folder c:/. And I want to create 11 pointers of type char*, each of this pointer contains the file ...
[2 replies] Last: That is THE solution to that! Thank you very much, Peter87! (by match88)
Array Help
 
declare an array to store the hospital bill amounts for 300 patients assign each element of the array a value of 40.00
[1 reply] : http://www.cplusplus.com/doc/tutorial/arrays/ http://www.cplusplus.com... (by Duthomhas)
i need your help
 
hi guys i'm doin this program to verify if there are consonants in a char matrix but i have this problem at line 24 |24|error: invalid types 'char ' for array s...
[1 reply] : Please use code blocks when you post code, like so: #include <iostrea... (by Yay295)
vectors basic doubt
 
I have a code which defines a vector as unsigned int nx=37; vector <unsigned> nNodes (1,nx); Does this mean that nNodes is a vector of 1 position with val...
[2 replies] Last: Thank you so much @Peter87 (by ryllprous)
C++ Programs???
 
Hello Everyone... Being a Programmer is my Dream I've learned C++ till Classes, Now I'm in Classes but I'm really confused what kind of programs I can write in...
[6 replies] Last: Thanks...! (by aminkhan943)
Problem reading 10 000 binary files
 
Hi Windows 7, 64 bits, Visual Studio 10. I have a problem to read a large number of binary files, process them and store them under a new name. The program an...
[5 replies] Last: Thanks a lot for several good suggestions that I will use in the futur... (by nissern)
by Alby94
Graphics.h runtime error
 
Despite having entered the library "graphics.h" in the folder "include" and the file "libbgi.a" in the "lib" folder and having linked the linker nell'immagie fo...
[1 reply] : It is because the BGI graphics expect powers that modern systems don't... (by Duthomhas)
Where do I put my server?
 
I've written a server that I want running 24/7 but I don't want to keep my computer on at all times and get a giant electric bill. Are there virtual machines or...
[11 replies] Last: raspberry PI is about 40-50 usd and its a lifetime purchase (by tath)
string related function
 
Hello , I'v composed a search engine to work on a specific database , using c language . the problem is : it only takes a single word , and searches for it ...
[2 replies] Last: thank you , exactly what i am looking for . (by dawibob)
Compiler Errors !!!!!!!!!!!!!
 
I am trying to run this source code but i am getting the compiler error Expression Must Have a Constant Value. I tried making both the variables x and y constan...
[3 replies] Last: In line 31, you are trying to allocate memory statically, or on the st... (by doug4)
Compiler error
 
Hello guys I'm trying to compile this code which is a header file. #ifndef CUBEMAP_H_INCLUDED #define CUBEMAP_H_INCLUDED #include "Texture.h" #include <...
[6 replies] Last: ok thanks (by romulosd)
by whilom
UVA Runtime Error Help
 
Working on UVA 11947: Cancer and Scorpio. I keep getting a runtime error and I dont know why. Link: http://uva.onlinejudge.org/index.php?option=com_onlineju...
[6 replies] Last: Or undefined behaviour, or lazy testing. Checkout if `findsign()' is ... (by ne555)
Arrays, Strings, and getline(). Help!
 
HELP!!!! I can't figure this out :( You must use an array (not a vector). Create a function to read each line of the web log file. Each line should then be...
[5 replies] Last: Well. Create a function to read each line of the web log file. std::... (by long double main)
Vectors and Reading/Writing Files. Help!!!
 
I am having so much trouble with this! I can't figure out how to write the code for this with the following requirements: download the text file weblog.txt ...
[2 replies] Last: Use code blocks when you paste code (click the <> button to the right)... (by Yay295)
by jakubk
ODE solver in C++
 
I am working on a project where I have to convert code that is written in MATLAB, to C++. I do not have access to MATLAB's complier. I am trying to solve a syst...
[2 replies] Last: I have been trying to use that I'm visual studios, however I keep gett... (by jakubk)
Removing all non-doubles from a string
 
I have many random strings that look something like this: " 55.343 Char 1.3825 asdf 0.1853 500 1.1359 4.0000 1 100 4.5043" Notices how ther...
[6 replies] Last: To the stream input manipulators, "100" and "100.0" both look like dou... (by Duthomhas)
Recursion Vs Loop
 
I came across many answers to this question and they all agreed on, loops have better performance than recursive function. However, What i am trying to do he...
[5 replies] Last: There was more than one question, dude. You all answered the second. I... (by Duthomhas)
Best way to resolve this ambiguity?
 
What is the best way to resolve this ambiguity, while making as little change to the pattern used as possible, especially in main? The SingingAthlete shall put...
[10 replies] Last: > Perhaps I should just tidy up the mess using a macro: > and simply u... (by JLBorges)
binary to decimal convertor
 
#include<iostream> #include<conio.h> using namespace std; void main() { int num1,num2,ans,rem; cout<<"enter the number in decimal:"<<endl; cin>>num1; ...
[6 replies] Last: Here's one that works for all integers. #include <iostream> #include... (by Yay295)
Qt - Downloading file from URL
 
Hello. I'm really new to Qt. I learnt GUI ~2 weeks. Now, I'm with networking. Based on the Qt examples (almost a copy), I made this class: (HEADER) #ifnd...
[2 replies] Last: I think that those are just warnings. Notice that the last line is "".... (by norm b)
May 2014 Pages: 1... 910111213... 31
  Archived months: [apr2014] [jun2014]

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